On NetBSD 10, compilation of the bdb
package with GCC-14 fails with the following error:
0$ gmake -C depends bdb CC=/usr/pkg/gcc14/bin/gcc
1<snip>
2./libtool --mode=compile /usr/pkg/gcc14/bin/gcc -c -I. -I../dist/./.. -I/home/hebasto/dev/bitcoin/depends/x86_64-unknown-netbsd10.0/include -D_XOPEN_SOURCE=600 -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int ../dist/./../env/env_config.c
3libtool: compile: /usr/pkg/gcc14/bin/gcc -c -I. -I../dist/./.. -I/home/hebasto/dev/bitcoin/depends/x86_64-unknown-netbsd10.0/include -D_XOPEN_SOURCE=600 -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int ../dist/./../env/env_config.c -fPIC -DPIC -o env_config.o
4../dist/./../env/env_config.c: In function '__config_parse':
5../dist/./../env/env_config.c:98:13: warning: implicit declaration of function 'strcasecmp'; did you mean 'strncmp'? [-Wimplicit-function-declaration]
6 98 | if (strcasecmp(s, argv[0]) == 0) { \
7 | ^~~~~~~~~~
8../dist/./../env/env_config.c:135:9: note: in expansion of macro 'CONFIG_UINT32'
9 135 | CONFIG_UINT32("mutex_set_align", __mutex_set_align);
10 | ^~~~~~~~~~~~~
11../dist/./../env/env_config.c: In function '__config_split':
12../dist/./../env/env_config.c:537:43: warning: implicit declaration of function 'strsep'; did you mean 'strdup'? [-Wimplicit-function-declaration]
13 537 | for (count = 0, ap = argv; (*ap = strsep(&input, " \t\n")) != NULL;)
14 | ^~~~~~
15 | strdup
16../dist/./../env/env_config.c:537:41: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
17 537 | for (count = 0, ap = argv; (*ap = strsep(&input, " \t\n")) != NULL;)
18 | ^
19gmake[1]: *** [Makefile:1664: env_config.o] Error 1
20gmake[1]: Leaving directory '/home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/bdb/4.8.30-cac45822ba8/build_unix'
21gmake: *** [funcs.mk:302: /home/hebasto/dev/bitcoin/depends/work/build/x86_64-unknown-netbsd10.0/bdb/4.8.30-cac45822ba8/build_unix/.stamp_built] Error 2
22gmake: Leaving directory '/home/hebasto/dev/bitcoin/depends'
This PR resolves the compilation issue.