mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:45:07 -05:00
configure: check if getaddrinfo() is available
This allows disabling IPv6 support and keeping getaddrinfo().
This commit is contained in:
6
configure
vendored
6
configure
vendored
@@ -413,6 +413,12 @@ then
|
|||||||
fi
|
fi
|
||||||
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=""
|
timepps_h=""
|
||||||
if [ $feat_pps = "1" ]; then
|
if [ $feat_pps = "1" ]; then
|
||||||
if test_code '<sys/timepps.h>' 'sys/timepps.h' '' '' ''; then
|
if test_code '<sys/timepps.h>' 'sys/timepps.h' '' '' ''; then
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ DNS_SetAddressFamily(int family)
|
|||||||
DNS_Status
|
DNS_Status
|
||||||
DNS_Name2IPAddress(const char *name, IPAddr *addr)
|
DNS_Name2IPAddress(const char *name, IPAddr *addr)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_GETADDRINFO
|
||||||
struct addrinfo hints, *res, *ai;
|
struct addrinfo hints, *res, *ai;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user