aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-07-04 21:48:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-07-04 21:48:54 +0000
commit4c17ba4fc044eb7eb02ed7ea8c716b8f7e6614d9 (patch)
treefb71d8e8b5d7a4d21f8cc69372a98f7a66c71547
parent4511f7ac5066350c5aa8f590871758bd867f93e8 (diff)
make sure the 3rd argument passed to bind() is a socklen_t
-rw-r--r--lib/connect.c2
-rw-r--r--lib/ftp.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/connect.c b/lib/connect.c
index ce3d40cf1..de8d29726 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -336,7 +336,7 @@ static CURLcode bindlocal(struct connectdata *conn,
Curl_resolv_unlock(data, h);
/* 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 */
#ifdef ENABLE_IPV6
struct sockaddr_in6 add;
diff --git a/lib/ftp.c b/lib/ftp.c
index 6cf6fcafb..88c9753a7 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1330,7 +1330,7 @@ CURLcode ftp_use_port(struct connectdata *conn)
if (addr || sa_filled_in) {
portsock = socket(AF_INET, SOCK_STREAM, 0);
if(CURL_SOCKET_BAD != portsock) {
- int size;
+ socklen_t size;
/* we set the secondary socket variable to this for now, it
is only so that the cleanup function will close it in case