From: Daniel Stenberg Date: Tue, 22 Apr 2025 06:55:21 +0000 (+0200) Subject: hostip: fix build when no async resolvers are present X-Git-Tag: curl-8_14_0~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f142056e01f2e3c58f89aaea80d131f129774d3e;p=thirdparty%2Fcurl.git hostip: fix build when no async resolvers are present Fixes #17124 Closes #17125 --- diff --git a/lib/asyn.h b/lib/asyn.h index a8404bb6e1..b3516dc4eb 100644 --- a/lib/asyn.h +++ b/lib/asyn.h @@ -280,6 +280,7 @@ void Curl_async_shutdown(struct Curl_easy *data); void Curl_async_destroy(struct Curl_easy *data); #else /* !USE_CURL_ASYNC */ #define Curl_async_shutdown(x) Curl_nop_stmt +#define Curl_async_destroy(x) Curl_nop_stmt #endif /* USE_CURL_ASYNC */ diff --git a/lib/hostip.c b/lib/hostip.c index cb782f24fc..365151e8a6 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -1474,6 +1474,7 @@ fail: } #endif +#ifdef USE_CURL_ASYNC CURLcode Curl_resolv_check(struct Curl_easy *data, struct Curl_dns_entry **dns) { @@ -1508,6 +1509,7 @@ CURLcode Curl_resolv_check(struct Curl_easy *data, show_resolve_info(data, *dns); return result; } +#endif int Curl_resolv_getsock(struct Curl_easy *data, curl_socket_t *socks) diff --git a/lib/hostip.h b/lib/hostip.h index 99635bf6bc..43d80ba730 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -187,8 +187,13 @@ CURLcode Curl_dnscache_add(struct Curl_easy *data, * Populate the cache with specified entries from CURLOPT_RESOLVE. */ CURLcode Curl_loadhostpairs(struct Curl_easy *data); + +#ifdef USE_CURL_ASYNC CURLcode Curl_resolv_check(struct Curl_easy *data, struct Curl_dns_entry **dns); +#else +#define Curl_resolv_check(x,y) CURLE_NOT_BUILT_IN +#endif int Curl_resolv_getsock(struct Curl_easy *data, curl_socket_t *socks);