commit:     9073abde03babca284e228f7049399f42e01fee6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 30 01:31:17 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 30 01:31:18 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9073abde

net-analyzer/netcat: fix build w/ c23

It needs more porting really for K&R decls but it builds OK with this,
so good enough for now.

Closes: https://bugs.gentoo.org/944910
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../netcat/files/netcat-110.20180111-c23.patch     | 29 ++++++++++++++++++++++
 net-analyzer/netcat/netcat-110.20180111-r2.ebuild  |  5 ++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/net-analyzer/netcat/files/netcat-110.20180111-c23.patch 
b/net-analyzer/netcat/files/netcat-110.20180111-c23.patch
new file mode 100644
index 000000000000..4459fb1fe89d
--- /dev/null
+++ b/net-analyzer/netcat/files/netcat-110.20180111-c23.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/944910
+--- a/netcat.c
++++ b/netcat.c
+@@ -257,7 +257,7 @@ void bail (str, p1, p2, p3, p4, p5, p6)
+ 
+ /* catch :
+    no-brainer interrupt handler */
+-void catch ()
++void catch (__attribute__ ((unused)) int unused)
+ {
+   errno = 0;
+   if (o_verbose > 1)          /* normally we don't care */
+@@ -267,14 +267,14 @@ void catch ()
+ 
+ /* quit :
+    handler for a "-q" timeout (exit 0 instead of 1) */
+-void quit ()
++void quit (__attribute__ ((unused)) int unused)
+ {
+   close (netfd);
+   exit (0);
+ }
+ 
+ /* timeout and other signal handling cruft */
+-void tmtravel ()
++void tmtravel (__attribute__ ((unused)) int unused)
+ {
+   signal (SIGALRM, SIG_IGN);
+   alarm (0);

diff --git a/net-analyzer/netcat/netcat-110.20180111-r2.ebuild 
b/net-analyzer/netcat/netcat-110.20180111-r2.ebuild
index a0e12d537ff6..836660734883 100644
--- a/net-analyzer/netcat/netcat-110.20180111-r2.ebuild
+++ b/net-analyzer/netcat/netcat-110.20180111-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,6 +18,7 @@ IUSE="ipv6 static"
 
 PATCHES=(
        "${FILESDIR}/${P}-variadic-holler.patch"
+       "${FILESDIR}/${PN}-110.20180111-c23.patch"
 )
 
 src_prepare() {
@@ -50,7 +51,7 @@ src_compile() {
                LD="$(tc-getCC) ${LDFLAGS}" \
                DFLAGS="${CPPFLAGS}" \
                XFLAGS="${CFLAGS}" \
-               STATIC=$(usex static '-static' '') \
+               STATIC=$(usev static '-static') \
                XLIBS="${xlibs}" \
                nc
 }

Reply via email to