Use AI_ADDRCONFIG only when defined

This seems to be missing on NetBSD.
This commit is contained in:
Miroslav Lichvar 2009-12-10 18:36:52 +01:00
parent 9d83369348
commit 78f37e726a

View file

@ -59,7 +59,9 @@ DNS_Name2IPAddress(const char *name, IPAddr *addr, int retry)
memset(&hints, 0, sizeof (hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
#ifdef AI_ADDRCONFIG
hints.ai_flags = AI_ADDRCONFIG;
#endif
try_again:
result = getaddrinfo(name, NULL, &hints, &res);