only use sockaddr_in6 on ipv6-enabled hosts
This commit is contained in:
parent
9729df1756
commit
8d0a823124
@ -332,7 +332,11 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
|
|
||||||
if( bind(sockfd, addr->ai_addr, addr->ai_addrlen) >= 0) {
|
if( bind(sockfd, addr->ai_addr, addr->ai_addrlen) >= 0) {
|
||||||
/* we succeeded to bind */
|
/* we succeeded to bind */
|
||||||
|
#ifdef ENABLE_IPV6
|
||||||
struct sockaddr_in6 add;
|
struct sockaddr_in6 add;
|
||||||
|
#else
|
||||||
|
struct sockaddr_in add;
|
||||||
|
#endif
|
||||||
|
|
||||||
bindworked = TRUE;
|
bindworked = TRUE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user