summaryrefslogtreecommitdiff
path: root/sys-apps/xinetd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-14 11:10:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-14 11:10:11 +0100
commit81b8f20732954c4508baf2f77472b5435e3f851f (patch)
tree4180177cb7ba85eab50159ce96218c2419fb24a6 /sys-apps/xinetd/files
parent946859e0e36904cffb3e0ccbccb6b7b1347c1cc8 (diff)
gentoo auto-resync : 14:09:2022 - 11:10:10
Diffstat (limited to 'sys-apps/xinetd/files')
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch43
-rw-r--r--sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch24
2 files changed, 67 insertions, 0 deletions
diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch b/sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch
new file mode 100644
index 000000000000..d2be93f08607
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15.4-0001-configure.ac-use-AC_USE_SYSTEM_EXTENSIONS.patch
@@ -0,0 +1,43 @@
+https://github.com/openSUSE/xinetd/pull/42
+
+From 0539bd4450020c83c6b72eec1004e3ce3f64554b Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 10 Sep 2022 13:59:20 +0100
+Subject: [PATCH 1/2] configure.ac: use AC_USE_SYSTEM_EXTENSIONS
+
+We use fcvt and gcvt, both of which are extensions
+guarded by GNU_SOURCE. Use AC_USE_SYSTEM_EXTENSIONS
+to ensure they're always available.
+
+Fixes a build failure on musl with Clang 15:
+```
+src/sio/sprint.c:176:15: error: call to undeclared function 'fcvt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ p = (char *)fcvt( num, precision, &decimal_point, is_negative ) ;
+src/sio/sprint.c:178:15: error: call to undeclared function 'ecvt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+ p = (char *)ecvt( num, precision+1, &decimal_point, is_negative ) ;
+```
+
+And drop a single #define _GNU_SOURCE from signals.c, as it's
+preferable to have it consistently defined across the codebase
+where possible. We have autotools, so let's use it.
+--- a/configure.ac
++++ b/configure.ac
+@@ -38,6 +38,8 @@ AC_CHECK_LIB([m], [log10], [
+ ])
+ AC_SUBST([LIBM_LIBS])
+
++AC_USE_SYSTEM_EXTENSIONS
++
+ # ======================================
+ # Check for various headers and settings
+ # ======================================
+--- a/src/signals.c
++++ b/src/signals.c
+@@ -7,7 +7,6 @@
+
+
+ #include "config.h"
+-#define _GNU_SOURCE
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <signal.h>
diff --git a/sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch b/sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch
new file mode 100644
index 000000000000..f53a11eba650
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-2.3.15.4-0002-redirect-drop-deprecated-sys-signal.h-include.patch
@@ -0,0 +1,24 @@
+https://github.com/openSUSE/xinetd/pull/42
+
+From 953a37c570a42743358cfc64e00e990813db1e09 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 10 Sep 2022 14:01:00 +0100
+Subject: [PATCH 2/2] redirect: drop deprecated <sys/signal.h> include
+
+Fix warning when building on musl:
+```
+In file included from src/redirect.c:23:
+/usr/include/sys/signal.h:1:2: warning: redirecting incorrect #include <sys/signal.h> to <signal.h> [-W#warnings]
+```
+
+We already include <signal.h>.
+--- a/src/redirect.c
++++ b/src/redirect.c
+@@ -20,7 +20,6 @@
+ #include <unistd.h>
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
+-#include <sys/signal.h>
+
+ #include "redirect.h"
+ #include "service.h"