]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: fix build when no async resolvers are present
authorDaniel Stenberg <daniel@haxx.se>
Tue, 22 Apr 2025 06:55:21 +0000 (08:55 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 22 Apr 2025 07:18:40 +0000 (09:18 +0200)
Fixes #17124
Closes #17125

lib/asyn.h
lib/hostip.c
lib/hostip.h

index a8404bb6e1a17d75ee050ada210fbb6f46bf36bb..b3516dc4ebcf151225ae7acfe1909a8da7795ff7 100644 (file)
@@ -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 */
 
 
index cb782f24fcf9aff89c7ba18b1bbeef1573a26de1..365151e8a6c26b65f7c14c18bae24c322e92c9f0 100644 (file)
@@ -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)
index 99635bf6bc44f6f38df77cfecf80e94b225f3466..43d80ba730af477c047884158471465312187642 100644 (file)
@@ -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);