mirror of
https://github.com/moparisthebest/curl
synced 2025-03-01 01:41:50 -05:00
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) {
|
||||
/* we succeeded to bind */
|
||||
#ifdef ENABLE_IPV6
|
||||
struct sockaddr_in6 add;
|
||||
#else
|
||||
struct sockaddr_in add;
|
||||
#endif
|
||||
|
||||
bindworked = TRUE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user