Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile failure in hostip.c without USE_CURL_ASYNC #6831

Closed
bnason-nf opened this issue Apr 1, 2021 · 3 comments
Closed

Compile failure in hostip.c without USE_CURL_ASYNC #6831

bnason-nf opened this issue Apr 1, 2021 · 3 comments
Labels
build name lookup DNS and related tech

Comments

@bnason-nf
Copy link
Contributor

Hi,

When building the latest curl (7.76.0) without asynchronous name resolution (USE_CURL_ASYNC is undefined), hostip.c fails to compile because the failf() call references the async member which doesn't exist. Probably this whole function can be omitted in this scenario.

Thanks,
Benbuck

@jay jay added build name lookup DNS and related tech labels Apr 1, 2021
jay added a commit to jay/curl that referenced this issue Apr 1, 2021
- 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, 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 curl#6831
Closes #xxxx
jay added a commit to jay/curl that referenced this issue Apr 1, 2021
- 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, 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 curl#6831
Closes #xxxx
@jay
Copy link
Member

jay commented Apr 1, 2021

I can reproduce this but only if the DNS backend is synchronous and DOH is disabled. See #6832

@bnason-nf
Copy link
Contributor Author

Hi @jay,

I appreciate the quick response, and yes, our configuration is probably pretty unusual. I think maybe it would be good to add the same ifdef to Curl_resolver_error() in hostip.h for consistency?

Thanks,
Benbuck

@jay jay closed this as completed in 3085ccf Apr 2, 2021
@jay
Copy link
Member

jay commented Apr 2, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build name lookup DNS and related tech
Development

Successfully merging a pull request may close this issue.

2 participants