]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
noproxy: fix build on systems without IPv6
authorDaniel Stenberg <daniel@haxx.se>
Sat, 6 Dec 2025 23:03:56 +0000 (00:03 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 6 Dec 2025 23:42:16 +0000 (00:42 +0100)
Follow-up to ff2aaed9ba6f186feb57f89fc6854
Reported-by: Harry Sintonen
Closes #19860

lib/noproxy.c

index e0d0877fdc4ff54437be836c4ec9c9299a993bd9..86acf8ba2b91d4de70f02e65d559948a452db011 100644 (file)
@@ -211,8 +211,10 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
     namelen = strlen(name);
     if(curlx_inet_pton(AF_INET, name, &address) == 1)
       type = TYPE_IPV4;
+#ifdef USE_IPV6
     else if(curlx_inet_pton(AF_INET6, name, &address) == 1)
       type = TYPE_IPV6;
+#endif
     else {
       /* ignore trailing dots in the hostname */
       if(name[namelen - 1] == '.')