xtrans: upstream patch: is_numeric: Add notdefined(IPv6) to checks

- https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues/6
- https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/23
This commit is contained in:
Rudi Heitbaum 2024-10-27 03:24:39 +00:00
parent 81a82b6bee
commit 67246d1940
2 changed files with 31 additions and 26 deletions

View File

@ -1,26 +0,0 @@
From 7bbfdbdce20179acac2581fa7441594e1942a4c7 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Sat, 19 Oct 2024 12:01:05 +0000
Subject: [PATCH] Revert "is_numeric: Add TRANS_SERVER to required ifdefs"
This reverts commit 0f153064bfa4bb69e86f3f2383f2f421f2360319.
---
Xtranssock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Xtranssock.c b/Xtranssock.c
index c9823bd..e380e70 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -196,7 +196,7 @@ static Sockettrans2dev Sockettrans2devtab[] = {
static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
#endif
-#if (defined(TCPCONN) && defined(TRANS_SERVER)) || defined(TRANS_REOPEN)
+#if defined(TCPCONN) || defined(TRANS_REOPEN)
static int
is_numeric (const char *str)
{
--
2.43.0

View File

@ -0,0 +1,31 @@
From c4207a952484ae1e128da75c87d0a7defba8cdb4 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Tue, 22 Oct 2024 14:44:46 -0700
Subject: [PATCH] is_numeric: Add !defined(IPv6) to checks
Fixes builds without IPv6 support, since old IPv4 code uses is_numeric()
Closes: #6
Fixes: 0f15306 ("is_numeric: Add TRANS_SERVER to required ifdefs")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
---
Xtranssock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Xtranssock.c b/Xtranssock.c
index c9823bd..a313b46 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -196,7 +196,8 @@ static Sockettrans2dev Sockettrans2devtab[] = {
static int TRANS(SocketINETClose) (XtransConnInfo ciptr);
#endif
-#if (defined(TCPCONN) && defined(TRANS_SERVER)) || defined(TRANS_REOPEN)
+#if (defined(TCPCONN) && defined(TRANS_SERVER)) || defined(TRANS_REOPEN) || \
+ !defined(IPv6)
static int
is_numeric (const char *str)
{
--
GitLab