summaryrefslogtreecommitdiff
path: root/x11/gdm/files/patch-daemon_gdm-x-session.c
blob: e8555ea21373f6f3208a5ba517f67d019b9d63c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- daemon/gdm-x-session.c.orig	2023-03-20 15:42:37 UTC
+++ daemon/gdm-x-session.c
@@ -20,6 +20,7 @@
 #include "config.h"
 
 #include <locale.h>
+#include <limits.h>
 #include <sysexits.h>
 
 #include "gdm-common.h"
@@ -114,7 +115,7 @@ prepare_auth_file (void)
         GError   *error = NULL;
         gboolean  prepared = FALSE;
         Xauth     auth_entry = { 0 };
-        char      localhost[HOST_NAME_MAX + 1] = "";
+        char      localhost[_POSIX_HOST_NAME_MAX + 1] = "";
 
         g_debug ("Preparing auth file for X server");
 
@@ -124,7 +125,7 @@ prepare_auth_file (void)
                 return NULL;
         }
 
-        if (gethostname (localhost, HOST_NAME_MAX) < 0) {
+        if (gethostname (localhost, _POSIX_HOST_NAME_MAX) < 0) {
                 strncpy (localhost, "localhost", sizeof (localhost) - 1);
         }