Skip to content

Commit

Permalink
net-mgmt/ipv6calc: Fix build with Clang 15 and remove the workaround
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sunpoet committed Jun 30, 2023
1 parent da96879 commit 7e55bfd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 1 addition & 7 deletions net-mgmt/ipv6calc/Makefile
Expand Up @@ -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>
11 changes: 11 additions & 0 deletions 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;

0 comments on commit 7e55bfd

Please sign in to comment.