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;