xserver: Branch 'server-21.1-branch' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 6 00:51:28 UTC 2024
include/dix-config.h.in | 3 +++
include/meson.build | 2 ++
os/access.c | 4 +++-
3 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 1a836cd47be8177cb3ab3ac2bc90e926c24c0cac
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Wed Oct 30 10:34:14 2024 -0700
dix-config.h: add HAVE_SOCKLEN_T definition
Needed to build with IPv6 disabled using gcc 14 on some platforms to avoid:
In file included from /usr/X11/include/X11/Xtrans/transport.c:67,
from xstrans.c:17:
/usr/X11/include/X11/Xtrans/Xtranssock.c: In function ‘_XSERVTransSocketOpen’:
/usr/X11/include/X11/Xtrans/Xtranssock.c:467:28: error: passing argument 5
of ‘getsockopt’ from incompatible pointer type [-Wincompatible-pointer-types]
467 | (char *) &val, &len) == 0 && val < 64 * 1024)
| ^~~~
| |
| size_t * {aka long unsigned int *}
(Backport to xserver-21.1-branch of commit a1b5aa5a7f12adc43720a5ae11e6c.
Backport adds autoconf equivalent to meson change from master branch.)
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1737>
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 382d70609..d8ba80c5f 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -173,6 +173,9 @@
/* Define to 1 if you have the `shmctl64' function. */
#undef HAVE_SHMCTL64
+/* Define to 1 if the system has the type 'socklen_t'. */
+#undef HAVE_SOCKLEN_T
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
diff --git a/include/meson.build b/include/meson.build
index 591bc25e0..dc785a38e 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -166,6 +166,8 @@ conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer') ? '1' : false)
conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64') ? '1' : false)
conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction') ? '1' : false)
conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask') ? '1' : false)
+# HAVE_SOCKLEN_T is used by xtrans when IPv6 is disabled
+conf_data.set('HAVE_SOCKLEN_T', cc.has_type('socklen_t', prefix: '#include <sys/socket.h>') ? '1' : false)
conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp') ? '1' : false)
conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr') ? '1' : false)
conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep) ? '1' : false)
commit 18c9cd6ab799cf8bd7fb90b4965455bece0046c3
Author: Joaquim Monteiro <joaquim.monteiro at protonmail.com>
Date: Sun Jun 23 21:23:47 2024 +0100
os: Fix siHostnameAddrMatch in the case where h_addr isn't defined
When IPv6 support isn't enabled, and h_addr isn't defined,
there is no for loop, so the break statement is invalid.
Signed-off-by: Joaquim Monteiro <joaquim.monteiro at protonmail.com>
(cherry picked from commit a6a993f9508ff0bd6f19695b2dfaef170c652525)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1737>
diff --git a/os/access.c b/os/access.c
index 9fe8bb7c7..74facf4e1 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1885,7 +1885,9 @@ siHostnameAddrMatch(int family, void *addr, int len,
if ((f == family) && (len == hostaddrlen) &&
(memcmp(addr, hostaddr, len) == 0)) {
res = TRUE;
+#ifdef h_addr
break;
+#endif
}
}
}
commit e8302b707d6fddf8e27daa0b3ef70fd3efec823c
Author: Joaquim Monteiro <joaquim.monteiro at protonmail.com>
Date: Sun Jun 23 21:17:25 2024 +0100
os: Fix assignment with incompatible pointer type
struct hostent->h_addr_list is of type char**, not const char**.
GCC considers this an error when in C99 mode or later.
Signed-off-by: Joaquim Monteiro <joaquim.monteiro at protonmail.com>
(cherry picked from commit 0ddcd8785199c08d9bded3c767a3b1227c670999)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1737>
diff --git a/os/access.c b/os/access.c
index 61ee8e30f..9fe8bb7c7 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1860,7 +1860,7 @@ siHostnameAddrMatch(int family, void *addr, int len,
char hostname[SI_HOSTNAME_MAXLEN];
int f, hostaddrlen;
void *hostaddr;
- const char **addrlist;
+ char **addrlist;
if (siAddrLen >= sizeof(hostname))
return FALSE;
More information about the xorg-commit
mailing list