Hi, On 8/13/2026 3:23 PM, Thomas Klausner wrote:
I've tried building this on NetBSD 11.99.7, but it fails with:
jbsockets.c: In function 'resolve_hostname_to_ip':
jbsockets.c:1529:27: error: 'resolver_mutex' undeclared (first use in this function)
1529 | privoxy_mutex_lock(&resolver_mutex);
| ^~~~~~~~~~~~~~
Can you please take a look at this?
Thanks for the feedback. I more or less understand the reason now — the
issue seems to be caused by an incorrect use of the AC_TRY_COMPILE
macro. It checks whether gethostbyname_r() is available in netdb.h by
trying to compile a test snippet.
The tricky part is that if gethostbyname_r() isn't declared in netdb.h at all and isn't in scope, the compiler can still successfully compile the test snippet with a warning like 'warning: implicit declaration of function 'gethostbyname_r'. As a result, the whole build system can end up relying on incorrect detection results.
In 11.99.7, most likely either the compiler behavior changed and it no longer allows implicit function declaration, or some implementation of gethostbyname_r() was added.
Anyway, I need to run some more tests and think about how to fix this properly.
Thanks!