git: 68fc045834a5 - main - net/portfwd: fix build with clang16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 Jun 2023 09:15:26 UTC
The branch main has been updated by ale:
URL: https://cgit.FreeBSD.org/ports/commit/?id=68fc045834a5dfa6f978b2ee77d969b62795250d
commit 68fc045834a5dfa6f978b2ee77d969b62795250d
Author: Alex Dupre <ale@FreeBSD.org>
AuthorDate: 2023-06-28 09:14:38 +0000
Commit: Alex Dupre <ale@FreeBSD.org>
CommitDate: 2023-06-28 09:15:22 +0000
net/portfwd: fix build with clang16
---
net/portfwd/Makefile | 2 ++
net/portfwd/files/patch-getopt_getopt.c | 10 ++++++++++
2 files changed, 12 insertions(+)
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