aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-24 09:13:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-24 09:13:50 +0000
commit8d0a823124e428e002fed7bc76d3fe2c33ffc023 (patch)
tree57960342969a2502d5fa489d6d03c635be74b925 /lib
parent9729df17567f85996ec6b622af3fe154d5475d86 (diff)
only use sockaddr_in6 on ipv6-enabled hosts
Diffstat (limited to 'lib')
-rw-r--r--lib/connect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index cd024edde..58506751b 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -332,7 +332,11 @@ static CURLcode bindlocal(struct connectdata *conn,
if( bind(sockfd, addr->ai_addr, addr->ai_addrlen) >= 0) {
/* we succeeded to bind */
+#ifdef ENABLE_IPV6
struct sockaddr_in6 add;
+#else
+ struct sockaddr_in add;
+#endif
bindworked = TRUE;