summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/if2ip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 4de81be60..3e74cc687 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -121,11 +121,11 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
#ifndef ENABLE_IPV6
(void) remote_scope;
-
-#ifndef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
- (void) remote_scope_id;
#endif
+#if !defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) || \
+ !defined(ENABLE_IPV6)
+ (void) remote_scope_id;
#endif
if(getifaddrs(&head) >= 0) {