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

Comments

@bnason-nf
Copy link
Contributor

@bnason-nf bnason-nf commented Apr 1, 2021

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 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 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

@bnason-nf bnason-nf commented Apr 1, 2021

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 in 3085ccf Apr 2, 2021
@jay
Copy link
Member

@jay jay commented Apr 2, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants