Skip to content

Commit

Permalink
connect: repair build without ipv6 availability
Browse files Browse the repository at this point in the history
Assisted-by: Daniel Stenberg
Reported-by: Tom G. Christensen

Fixes #6069
Closes #6071
  • Loading branch information
jay authored and bagder committed Oct 15, 2020
1 parent a654fdc commit 8b1a10c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8b1a10c

Please sign in to comment.