aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 62c941e5d..bfa34bae8 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -215,8 +215,12 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
/* we have received data here */
{
curl_socket_t s = CURL_SOCKET_BAD;
- socklen_t size = (socklen_t) sizeof(struct sockaddr_in);
+#ifdef ENABLE_IPV6
+ struct Curl_sockaddr_storage add;
+#else
struct sockaddr_in add;
+#endif
+ socklen_t size = (socklen_t) sizeof(add);
if(0 == getsockname(sock, (struct sockaddr *) &add, &size))
s=accept(sock, (struct sockaddr *) &add, &size);