aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-06-30 07:02:08 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-06-30 07:02:08 +0000
commit7e55bfd508b9e90a08978d6bded5b63124f86284 (patch)
tree4fb202f165e5457ccb84d000cd82c4a3773ec4cb
parentda96879928993afb0e0f2194a7056bc0f08e7373 (diff)
downloadports-7e55bfd508b9e90a08978d6bded5b63124f86284.tar.gz
ports-7e55bfd508b9e90a08978d6bded5b63124f86284.zip
net-mgmt/ipv6calc: Fix build with Clang 15 and remove the workaround
libipv6calc_db_wrapper.c:2901:23: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] ret = get_array_row(i, &value_first_00_31, &value_first_32_63, &value_last_00_31, &value_last_32_63); ^ 1 error generated.
-rw-r--r--net-mgmt/ipv6calc/Makefile8
-rw-r--r--net-mgmt/ipv6calc/files/patch-clang1511
2 files changed, 12 insertions, 7 deletions
diff --git a/net-mgmt/ipv6calc/Makefile b/net-mgmt/ipv6calc/Makefile
index 0f603565f941..656913f69c61 100644
--- a/net-mgmt/ipv6calc/Makefile
+++ b/net-mgmt/ipv6calc/Makefile
@@ -20,13 +20,7 @@ GNU_CONFIGURE= yes
SHEBANG_FILES= tools/*
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD && ((${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000) || ${OSVERSION} >= 1400079)
-CFLAGS+= -Wno-error=deprecated-non-prototype
-.endif
-
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/ipv6calc/files/patch-clang15 b/net-mgmt/ipv6calc/files/patch-clang15
new file mode 100644
index 000000000000..561ba8c5dd68
--- /dev/null
+++ b/net-mgmt/ipv6calc/files/patch-clang15
@@ -0,0 +1,11 @@
+--- databases/lib/libipv6calc_db_wrapper.c.orig 2023-06-12 07:11:54 UTC
++++ databases/lib/libipv6calc_db_wrapper.c
+@@ -2778,7 +2778,7 @@ long int libipv6calc_db_wrapper_get_entry_generic(
+ const uint32_t lookup_key_00_31, // lookup key MSB
+ const uint32_t lookup_key_32_63, // lookup key LSB
+ void *data_ptr, // pointer to DB data in case of IPV6CALC_DB_LOOKUP_DATA_PTR_TYPE_BDB, otherwise NULL
+- int (*get_array_row)() // function to get array row
++ int (*get_array_row)(int, uint32_t*, uint32_t*, uint32_t*, uint32_t*) // function to get array row
+ ) {
+
+ int retval = -1;