diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-07 12:20:57 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-07 12:20:57 (GMT) |
commit | c47af14ee16876327d48e34929961e4a49dd6f60 (patch) | |
tree | bec6d8b79a91a0f6127353a535792c7f92daddcc /Source/CTest/Curl | |
parent | ce54dc97ed60b8f50e3193b20ecf62e9659a991f (diff) | |
download | CMake-c47af14ee16876327d48e34929961e4a49dd6f60.zip CMake-c47af14ee16876327d48e34929961e4a49dd6f60.tar.gz CMake-c47af14ee16876327d48e34929961e4a49dd6f60.tar.bz2 |
COMP: Fix compile warnings on certain hp systems
Diffstat (limited to 'Source/CTest/Curl')
-rw-r--r-- | Source/CTest/Curl/ftp.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/CTest/Curl/ftp.c b/Source/CTest/Curl/ftp.c index a6d1587..eb26895 100644 --- a/Source/CTest/Curl/ftp.c +++ b/Source/CTest/Curl/ftp.c @@ -196,11 +196,15 @@ static CURLcode AllowServerConnect(struct connectdata *conn) /* we have received data here */ { curl_socket_t s; - size_t size = sizeof(struct sockaddr_in); +#ifdef __hpux + int size = sizeof(struct sockaddr_in); +#else + socklen_t size = sizeof(struct sockaddr_in); +#endif struct sockaddr_in add; - getsockname(sock, (struct sockaddr *) &add, (socklen_t *)&size); - s=accept(sock, (struct sockaddr *) &add, (socklen_t *)&size); + getsockname(sock, (struct sockaddr *) &add, &size); + s=accept(sock, (struct sockaddr *) &add, &size); sclose(sock); /* close the first socket */ @@ -1315,7 +1319,11 @@ CURLcode ftp_use_port(struct connectdata *conn) if(!addr) { /* pick a suitable default here */ +#ifdef __hpux + int sslen; +#else socklen_t sslen; +#endif sslen = sizeof(sa); if (getsockname(conn->sock[FIRSTSOCKET], @@ -1348,7 +1356,11 @@ CURLcode ftp_use_port(struct connectdata *conn) if(bind(portsock, (struct sockaddr *)&sa, size) >= 0) { /* we succeeded to bind */ struct sockaddr_in add; +#ifdef __hpux + int socksize = sizeof(add); +#else socklen_t socksize = sizeof(add); +#endif if(getsockname(portsock, (struct sockaddr *) &add, &socksize)<0) { |