aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2023-06-28 09:14:38 +0000
committerAlex Dupre <ale@FreeBSD.org>2023-06-28 09:15:22 +0000
commit68fc045834a5dfa6f978b2ee77d969b62795250d (patch)
tree09f60cf7b249cdd1c56384ae837f245808e4f549
parent10cc2a429127353723deb84511e7a306d04379db (diff)
downloadports-68fc045834a5dfa6f978b2ee77d969b62795250d.tar.gz
ports-68fc045834a5dfa6f978b2ee77d969b62795250d.zip
net/portfwd: fix build with clang16
-rw-r--r--net/portfwd/Makefile2
-rw-r--r--net/portfwd/files/patch-getopt_getopt.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/net/portfwd/Makefile b/net/portfwd/Makefile
index 0d557847f6d0..5c23feb03a42 100644
--- a/net/portfwd/Makefile
+++ b/net/portfwd/Makefile
@@ -22,6 +22,8 @@ post-patch:
${WRKSRC}/src/Makefile.am
@${REINPLACE_CMD} -e "s|-Wall -g -O3|${CFLAGS}|g" \
${WRKSRC}/tools/Makefile.am
+ @${REINPLACE_CMD} -e "s|register ||g" \
+ ${WRKSRC}/src/lexconf.c ${WRKSRC}/src/yconf.c
@${TOUCH} ${WRKSRC}/* ${WRKSRC}/*/*
post-install:
diff --git a/net/portfwd/files/patch-getopt_getopt.c b/net/portfwd/files/patch-getopt_getopt.c
new file mode 100644
index 000000000000..2a2f5ea43e7d
--- /dev/null
+++ b/net/portfwd/files/patch-getopt_getopt.c
@@ -0,0 +1,10 @@
+--- getopt/getopt.c.orig 2023-06-28 09:07:29 UTC
++++ getopt/getopt.c
+@@ -40,6 +40,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <string.h>
+
+ /* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. This code is part of the GNU C