EAI_ADDRFAMILY is obsolete and FreeBSD/s netdb.h does not provide a definition.
Signed-off-by: Ed Maste <ema...@freebsd.org> --- tests/test-io-channel-socket.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c index 0697363..f4dbd60 100644 --- a/tests/test-io-channel-socket.c +++ b/tests/test-io-channel-socket.c @@ -63,7 +63,10 @@ static int check_protocol_support(bool *has_ipv4, bool *has_ipv6) gaierr = getaddrinfo("::1", NULL, &hints, &ai); if (gaierr != 0) { - if (gaierr == EAI_ADDRFAMILY || + if ( +#ifdef EAI_ADDRFAMILY + gaierr == EAI_ADDRFAMILY || +#endif gaierr == EAI_FAMILY || gaierr == EAI_NONAME) { *has_ipv6 = false; -- 2.4.6