summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/if2ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/if2ip.c')
-rw-r--r--libs/libcurl/src/if2ip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/libcurl/src/if2ip.c b/libs/libcurl/src/if2ip.c
index a3f07befce..2a4444d3e5 100644
--- a/libs/libcurl/src/if2ip.c
+++ b/libs/libcurl/src/if2ip.c
@@ -67,7 +67,8 @@
unsigned int Curl_ipv6_scope(const struct sockaddr *sa)
{
if(sa->sa_family == AF_INET6) {
- const struct sockaddr_in6 * sa6 = (const struct sockaddr_in6 *)(void *) sa;
+ const struct sockaddr_in6 * sa6 =
+ (const struct sockaddr_in6 *)(const void *) sa;
const unsigned char *b = sa6->sin6_addr.s6_addr;
unsigned short w = (unsigned short) ((b[0] << 8) | b[1]);
@@ -92,7 +93,7 @@ unsigned int Curl_ipv6_scope(const struct sockaddr *sa)
}
#endif
-#ifndef CURL_DISABLE_BINDLOCAL
+#if !defined(CURL_DISABLE_BINDLOCAL) || !defined(CURL_DISABLE_FTP)
#if defined(HAVE_GETIFADDRS)
@@ -265,4 +266,4 @@ if2ip_result_t Curl_if2ip(int af,
#endif
-#endif /* CURL_DISABLE_BINDLOCAL */
+#endif /* CURL_DISABLE_BINDLOCAL && CURL_DISABLE_FTP */