]> git.ipfire.org Git - thirdparty/openwrt.git/commit
thc-ipv6: fix compilation with GCC 15 23956/head
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 26 Jun 2026 22:42:11 +0000 (00:42 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 27 Jun 2026 09:48:27 +0000 (11:48 +0200)
commit4a5642413be47e5f43d161a2a087ca6f45c9706b
tree15567fddf86f45f7315ac52f78b10464cf534ce5
parentaea3d6cee16c98b5a799a3a6f24fd2282a6de3a7
thc-ipv6: fix compilation with GCC 15

GCC 15 defaults to C23, where an empty parameter list "()" means
"(void)" instead of an unspecified argument list. This broke thc-ipv6 in
two ways:

 - thc-ipv6.h declared thc_open_ipv6() with an empty argument list, so
   its prototype became "int(void)" and conflicted with the actual
   definition "int thc_open_ipv6(char *interface)" and all of its
   callers:

     thc-ipv6-lib.c:127:36: error: too many arguments to function
     'thc_open_ipv6'; expected 0, have 1
     thc-ipv6-lib.c:2555:5: error: conflicting types for 'thc_open_ipv6';
     have 'int(char *)'

 - The alarming() SIGALRM handlers in detect_sniffer6.c and thcping6.c
   were declared with "()", so their type became "void (*)(void)" and no
   longer matched the "void (*)(int)" expected by signal():

     detect_sniffer6.c:140:19: error: passing argument 2 of 'signal'
     from incompatible pointer type [-Wincompatible-pointer-types]

Add patches giving the prototype and the signal handlers their proper
signatures.

Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/openwrt/pull/23956
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/ipv6/thc-ipv6/patches/102-fix-thc_open_ipv6-prototype.patch [new file with mode: 0644]
package/network/ipv6/thc-ipv6/patches/103-fix-signal-handler-prototypes.patch [new file with mode: 0644]