configure: check if getaddrinfo() is available
This allows disabling IPv6 support and keeping getaddrinfo().
This commit is contained in:
parent
9b137b2e37
commit
d243f1f8fe
2 changed files with 7 additions and 1 deletions
6
configure
vendored
6
configure
vendored
|
@ -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>' 'sys/timepps.h' '' '' ''; then
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue