From: Daniel Stenberg Date: Thu, 4 Feb 2021 22:40:54 +0000 (+0100) Subject: hostip: fix build with sync resolver X-Git-Tag: curl-7_76_0~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6cd167a;p=thirdparty%2Fcurl.git hostip: fix build with sync resolver Reported-by: David Goerger Follow-up from 8335c6417 Fixes #6566 Closes #6568 --- diff --git a/lib/hostip.c b/lib/hostip.c index 8ba3fe81ce..1a86e6a231 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -520,8 +520,14 @@ enum resolve_t Curl_resolv(struct Curl_easy *data, if(data->set.resolver_start) { int st; Curl_set_in_callback(data, true); - st = data->set.resolver_start(data->state.async.resolver, NULL, - data->set.resolver_start_client); + st = data->set.resolver_start( +#ifdef CURLRES_SYNCH + NULL, +#else + data->state.async.resolver, +#endif + NULL, + data->set.resolver_start_client); Curl_set_in_callback(data, false); if(st) return CURLRESOLV_ERROR; @@ -1102,10 +1108,12 @@ CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done) CURLcode result; struct connectdata *conn = data->conn; +#ifndef CURLRES_SYNCH if(data->state.async.dns) { conn->dns_entry = data->state.async.dns; data->state.async.dns = NULL; } +#endif result = Curl_setup_conn(data, protocol_done);