Use AI_ADDRCONFIG only when defined
This seems to be missing on NetBSD.
This commit is contained in:
parent
9d83369348
commit
78f37e726a
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue