mirror of
https://github.com/curl/curl.git
synced 2026-07-28 17:53:06 +03:00
asyn-thrdd: add IPv6 guards
It seems that the usual '#ifdef USE_IPV6' guards have been overlooked in lib/asyn-thrdd.c. This commit makes sure that the code compiles if IPv6 is not available. Closes #21881
This commit is contained in:
parent
c0d433d080
commit
04a85a1d38
1 changed files with 8 additions and 1 deletions
|
|
@ -481,8 +481,13 @@ static void async_thrdd_report_item(struct Curl_easy *data,
|
|||
struct dynbuf tmp;
|
||||
const char *sep = "";
|
||||
const struct Curl_addrinfo *ai = item->res;
|
||||
int ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
|
||||
CURLcode result;
|
||||
int ai_family;
|
||||
#ifdef USE_IPV6
|
||||
ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
|
||||
#else
|
||||
ai_family = AF_INET;
|
||||
#endif
|
||||
|
||||
if(!CURL_TRC_DNS_is_verbose(data))
|
||||
return;
|
||||
|
|
@ -792,10 +797,12 @@ const struct Curl_addrinfo *Curl_async_get_ai(struct Curl_easy *data,
|
|||
if(thrdd->res_A)
|
||||
return async_thrdd_get_ai(thrdd->res_A->res, ai_family, index);
|
||||
break;
|
||||
#ifdef USE_IPV6
|
||||
case AF_INET6:
|
||||
if(thrdd->res_AAAA)
|
||||
return async_thrdd_get_ai(thrdd->res_AAAA->res, ai_family, index);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue