]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-ares: fix build without IPv6 support
authorDaniel Stenberg <daniel@haxx.se>
Fri, 25 Jul 2014 07:25:16 +0000 (09:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 25 Jul 2014 07:26:13 +0000 (09:26 +0200)
Bug: http://curl.haxx.se/mail/lib-2014-07/0337.html
Reported-by: Spork Schivago
lib/asyn-ares.c

index d651c252ded81335c7308a6a98022d4fa258c30d..cb99a1f46e098eb2f7565768074e305f0088e23d 100644 (file)
@@ -669,7 +669,7 @@ CURLcode Curl_set_dns_local_ip4(struct SessionHandle *data,
 CURLcode Curl_set_dns_local_ip6(struct SessionHandle *data,
                                 const char *local_ip6)
 {
-#if (ARES_VERSION >= 0x010704)
+#if (ARES_VERSION >= 0x010704) && defined(ENABLE_IPV6)
   unsigned char a6[INET6_ADDRSTRLEN];
 
   if((!local_ip6) || (local_ip6[0] == 0)) {