-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Describe the bug
jq will not compile for OpenBSD under clang 19 due to -Werror=implicit-function-declaration being automatic.
Sample errors:
> src/builtin.c:247:31: error: call to undeclared function 'lgamma_r'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 247 | jv ret = JV_ARRAY(jv_number(lgamma_r(jv_number_value(input), &sign)));
> | ^
> src/builtin.c:1341:10: error: call to undeclared function 'timegm'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 1341 | return timegm(tm);
> | ^
To Reproduce
./configure && make
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
OpenBSD 7.5, clang 19
Additional context
Fixed with CFLAGS=-D_BSD_SOURCE=1. Autoconf detects these symbols in -lm but they are not visible in headers by default.