lib: --disable-bindlocal builds curl without local binding support

This commit is contained in:
Daniel Stenberg 2023-08-17 14:36:30 +02:00
parent 97a79c79a7
commit e67718eef7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 39 additions and 0 deletions

View file

@ -390,6 +390,7 @@ void Curl_sndbufset(curl_socket_t sockfd)
}
#endif
#ifndef CURL_DISABLE_BINDLOCAL
static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
curl_socket_t sockfd, int af, unsigned int scope)
{
@ -648,6 +649,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
return CURLE_INTERFACE_FAILED;
}
#endif
/*
* verifyconnect() returns TRUE if the connect really has happened.
@ -1018,6 +1020,7 @@ static CURLcode cf_socket_open(struct Curl_cfilter *cf,
}
}
#ifndef CURL_DISABLE_BINDLOCAL
/* possibly bind the local end to an IP, interface or port */
if(ctx->addr.family == AF_INET
#ifdef ENABLE_IPV6
@ -1035,6 +1038,7 @@ static CURLcode cf_socket_open(struct Curl_cfilter *cf,
goto out;
}
}
#endif
/* set socket non-blocking */
(void)curlx_nonblock(ctx->sock, TRUE);