summaryrefslogtreecommitdiff
path: root/x11/gdm/files/patch-daemon_gdm-x-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11/gdm/files/patch-daemon_gdm-x-session.c')
-rw-r--r--x11/gdm/files/patch-daemon_gdm-x-session.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/x11/gdm/files/patch-daemon_gdm-x-session.c b/x11/gdm/files/patch-daemon_gdm-x-session.c
index 5846e278e63e..e8555ea21373 100644
--- a/x11/gdm/files/patch-daemon_gdm-x-session.c
+++ b/x11/gdm/files/patch-daemon_gdm-x-session.c
@@ -1,20 +1,28 @@
---- daemon/gdm-x-session.c.orig 2022-01-12 14:15:56 UTC
+--- daemon/gdm-x-session.c.orig 2023-03-20 15:42:37 UTC
+++ daemon/gdm-x-session.c
-@@ -114,7 +114,7 @@ prepare_auth_file (void)
+@@ -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[256] = "";
++ char localhost[_POSIX_HOST_NAME_MAX + 1] = "";
g_debug ("Preparing auth file for X server");
-@@ -124,7 +124,7 @@ prepare_auth_file (void)
+@@ -124,7 +125,7 @@ prepare_auth_file (void)
return NULL;
}
- if (gethostname (localhost, HOST_NAME_MAX) < 0) {
-+ if (gethostname (localhost, 255) < 0) {
++ if (gethostname (localhost, _POSIX_HOST_NAME_MAX) < 0) {
strncpy (localhost, "localhost", sizeof (localhost) - 1);
}