diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2020-10-15 02:47:49 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2020-10-15 02:48:39 -0400 |
commit | f2828bbc09ddce543928acdc7710004828376171 (patch) | |
tree | 1cee747818fb15b9093af81a60eaedab2d84b44a | |
parent | 15997f6db53c70070177739716dc518e667e6090 (diff) | |
download | curl-bagder/connect-ipv6less.tar.gz |
connect: repair build without ipv6 availabilitybagder/connect-ipv6less
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.c | 4 |
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", |