aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-09 07:52:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-09 07:52:36 +0000
commit011929cf4d825c327769c647bf9b7ad0530b1cb9 (patch)
treed6162feb898f163c32e88566f87419f76b6699d4
parent7f679c3da3f941789a6a9654bbced6a81ddd932b (diff)
Tor Arntsen's patch for working around a notorious bug in the AIX5
getaddrinfo() implementation.
-rw-r--r--lib/ftp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 49a46fe99..5450c8543 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1167,6 +1167,12 @@ CURLcode ftp_use_port(struct connectdata *conn)
portsock = -1;
for (ai = res; ai; ai = ai->ai_next) {
+ /*
+ * Workaround for AIX5 getaddrinfo() problem (it doesn't set ai_socktype):
+ */
+ if (ai->ai_socktype == 0)
+ ai->ai_socktype = hints.ai_socktype;
+
portsock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (portsock < 0)
continue;