]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
only use sockaddr_in6 on ipv6-enabled hosts
authorDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jun 2004 09:13:50 +0000 (09:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jun 2004 09:13:50 +0000 (09:13 +0000)
lib/connect.c

index cd024edde579ad96898b20f1ab9ef66571f832ff..58506751bd7fddc603da567c700a42b790624e0f 100644 (file)
@@ -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;