mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:35:06 -05:00
Use AI_ADDRCONFIG only when defined
This seems to be missing on NetBSD.
This commit is contained in:
@@ -59,7 +59,9 @@ DNS_Name2IPAddress(const char *name, IPAddr *addr, int retry)
|
|||||||
memset(&hints, 0, sizeof (hints));
|
memset(&hints, 0, sizeof (hints));
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
#ifdef AI_ADDRCONFIG
|
||||||
hints.ai_flags = AI_ADDRCONFIG;
|
hints.ai_flags = AI_ADDRCONFIG;
|
||||||
|
#endif
|
||||||
|
|
||||||
try_again:
|
try_again:
|
||||||
result = getaddrinfo(name, NULL, &hints, &res);
|
result = getaddrinfo(name, NULL, &hints, &res);
|
||||||
|
|||||||
Reference in New Issue
Block a user