]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Use AI_ADDRCONFIG only when defined
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Dec 2009 17:36:52 +0000 (18:36 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Dec 2009 17:37:58 +0000 (18:37 +0100)
This seems to be missing on NetBSD.

nameserv.c

index 2a8feae9682a71988a6de8134be691b596863127..98e5359a280d42bf11b860c2df523ae73ca697fc 100644 (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);