summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2020-10-15 02:47:49 -0400
committerDaniel Stenberg <daniel@haxx.se>2020-10-15 12:56:57 +0200
commit8b1a10cdf7fe0dd1dc288106500f6333b77b51a6 (patch)
tree0760fc6433d70048dad5b312a39b2b8e985b684f
parenta654fdc9d15bf95c07a293be445c773792321374 (diff)
downloadcurl-8b1a10cdf7fe0dd1dc288106500f6333b77b51a6.tar.gz
connect: repair build without ipv6 availability
Assisted-by: Daniel Stenberg Reported-by: Tom G. Christensen Fixes https://github.com/curl/curl/issues/6069 Closes https://github.com/curl/curl/pull/6071
-rw-r--r--lib/connect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 5f23b79ca..7f33ea4ba 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1334,8 +1334,12 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
conn->tempfamily[0] = conn->tempaddr[0]?
conn->tempaddr[0]->ai_family:0;
+#ifdef ENABLE_IPV6
conn->tempfamily[1] = conn->tempfamily[0] == AF_INET6 ?
AF_INET : AF_INET6;
+#else
+ conn->tempfamily[1] = AF_UNSPEC;
+#endif
ainext(conn, 1, FALSE); /* assigns conn->tempaddr[1] accordingly */
DEBUGF(infof(data, "family0 == %s, family1 == %s\n",