]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
noproxy: fix builds without AF_INET6
authorViktor Szakats <commit@vsz.me>
Fri, 21 Oct 2022 19:06:25 +0000 (19:06 +0000)
committerViktor Szakats <commit@vsz.me>
Fri, 21 Oct 2022 19:06:25 +0000 (19:06 +0000)
Regression from 1e9a538e05c0107c54ef81d9de7cd0b27cd13309

Reviewed-by: Daniel Stenberg
Closes #9778

lib/noproxy.c

index 701a09e04f247728f6f20243a998ac3738749eeb..0b9355a663f07eb5d8547a061129141e87be1688 100644 (file)
@@ -70,6 +70,7 @@ UNITTEST bool Curl_cidr6_match(const char *ipv6,
                                const char *network,
                                unsigned int bits)
 {
+#ifdef ENABLE_IPV6
   int bytes;
   int rest;
   unsigned char address[16];
@@ -92,6 +93,9 @@ UNITTEST bool Curl_cidr6_match(const char *ipv6,
     return FALSE;
 
   return TRUE;
+#else
+  return FALSE;
+#endif
 }
 
 enum nametype {