diff --git a/configure b/configure index 7d91445..db02242 100755 --- a/configure +++ b/configure @@ -413,6 +413,12 @@ then fi fi +if test_code 'getaddrinfo()' 'sys/types.h sys/socket.h netdb.h' '' '' \ + 'return getaddrinfo(0, 0, 0, 0);' +then + add_def HAVE_GETADDRINFO +fi + timepps_h="" if [ $feat_pps = "1" ]; then if test_code '' 'sys/timepps.h' '' '' ''; then diff --git a/nameserv.c b/nameserv.c index 328212b..f8a4b63 100644 --- a/nameserv.c +++ b/nameserv.c @@ -46,7 +46,7 @@ DNS_SetAddressFamily(int family) DNS_Status DNS_Name2IPAddress(const char *name, IPAddr *addr) { -#ifdef HAVE_IPV6 +#ifdef HAVE_GETADDRINFO struct addrinfo hints, *res, *ai; int result;