mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
make sure the 3rd argument passed to bind() is a socklen_t
This commit is contained in:
parent
4511f7ac50
commit
4c17ba4fc0
@ -336,7 +336,7 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
Curl_resolv_unlock(data, h);
|
Curl_resolv_unlock(data, h);
|
||||||
/* we don't need it anymore after this function has returned */
|
/* we don't need it anymore after this function has returned */
|
||||||
|
|
||||||
if( bind(sockfd, addr->ai_addr, addr->ai_addrlen) >= 0) {
|
if( bind(sockfd, addr->ai_addr, (socklen_t)addr->ai_addrlen) >= 0) {
|
||||||
/* we succeeded to bind */
|
/* we succeeded to bind */
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
struct sockaddr_in6 add;
|
struct sockaddr_in6 add;
|
||||||
|
@ -1330,7 +1330,7 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
|||||||
if (addr || sa_filled_in) {
|
if (addr || sa_filled_in) {
|
||||||
portsock = socket(AF_INET, SOCK_STREAM, 0);
|
portsock = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if(CURL_SOCKET_BAD != portsock) {
|
if(CURL_SOCKET_BAD != portsock) {
|
||||||
int size;
|
socklen_t size;
|
||||||
|
|
||||||
/* we set the secondary socket variable to this for now, it
|
/* we set the secondary socket variable to this for now, it
|
||||||
is only so that the cleanup function will close it in case
|
is only so that the cleanup function will close it in case
|
||||||
|
Loading…
Reference in New Issue
Block a user