doh_connect_makeuri fails on illumos
Compiling doh_test
(5069b58d) with GCC 10.3.0 on OpenIndiana 2021.10 (illumos-ee57561bf1
) produces warning and the doh_connect_makeuri
test fails:
/usr/gcc/10/bin/gcc -DHAVE_CONFIG_H -I. -I../../.. -D_FORTIFY_SOURCE=2 -include ../../../config.h -I./include -I../../../include -I../../../lib/isc/include -I../../../lib/isc/include -DNAMED_PLUGINDIR=\"/usr/lib/dns/amd64/named\" -DSKIPPED_TEST_EXIT_CODE=77 -DTESTS_DIR=\"/export/home/newman/bind9/lib/isc/tests\" -I/usr/openssl/1.0/include -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wno-missing-field-initializers -Wformat -Wshadow -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=format-security -Werror=parentheses -Werror=implicit -Werror=strict-prototypes -fno-strict-aliasing -fno-delete-null-pointer-checks -fdiagnostics-show-option -fsanitize=undefined -m64 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6 -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra -D_POSIX_PTHREAD_SEMANTICS -pthread -MT doh_test-doh_test.o -MD -MP -MF .deps/doh_test-doh_test.Tpo -c -o doh_test-doh_test.o `test -f 'doh_test.c' || echo './'`doh_test.c
doh_test.c: In function 'doh_connect_makeuri':
doh_test.c:2069:31: warning: missing braces around initializer [-Wmissing-braces]
2069 | struct in_addr localhostv4 = { ntohl(INADDR_LOOPBACK) };
| ^
| {{ }}
[ RUN ] doh_connect_makeuri
[ ERROR ] --- strcmp("https://127.0.0.1:443/dns-query", uri) == 0
[ LINE ] --- doh_test.c:2079: error: Failure!
[ FAILED ] doh_connect_makeuri