diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2021-04-01 15:15:01 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2021-04-02 02:38:43 -0400 |
commit | 3085ccfae996bb0fa606d2c7bc6783dc15d76a30 (patch) | |
tree | 32632fbb9edac45ebeb9b940b4b0fcb1424add89 | |
parent | 06a7f2745e58cd472894a2f4bd706c18a1acd03d (diff) | |
download | curl-3085ccfae996bb0fa606d2c7bc6783dc15d76a30.tar.gz |
hostip: Fix for builds that disable all asynchronous DNS
- Define Curl_resolver_error function only when USE_CURL_ASYNC.
Prior to this change building curl without an asynchronous resolver
backend (c-ares or threaded) and without DoH (DNS-over-HTTPS, which is
also asynchronous but independent of resolver backend) would cause a
build error since Curl_resolver_error is called by and evaluates
variables only available in asynchronous builds.
Reported-by: Benbuck Nason
Fixes https://github.com/curl/curl/issues/6831
Closes https://github.com/curl/curl/pull/6832
-rw-r--r-- | lib/hostip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 750afe8a9..34fb7db65 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -1130,6 +1130,7 @@ CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done) * resolve error */ +#ifdef USE_CURL_ASYNC CURLcode Curl_resolver_error(struct Curl_easy *data) { const char *host_or_proxy; @@ -1153,3 +1154,4 @@ CURLcode Curl_resolver_error(struct Curl_easy *data) return result; } +#endif /* USE_CURL_ASYNC */ |