asyn-thrdd: fix Curl_async_getaddrinfo() on systems without getaddrinfo

Follow-up to ce06fe7771
Bug: ce06fe7771 (r172215567)
Reported-by: Harry Sintonen
Closes #19859
This commit is contained in:
Daniel Stenberg 2025-12-06 23:45:06 +01:00
parent 0b5ece553c
commit f4b56f34ba
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -725,24 +725,18 @@ CURLcode Curl_async_pollset(struct Curl_easy *data, struct easy_pollset *ps)
/*
* Curl_async_getaddrinfo() - for platforms without getaddrinfo
*/
struct Curl_addrinfo *Curl_async_getaddrinfo(struct Curl_easy *data,
const char *hostname,
int port,
int ip_version,
int *waitp)
CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, const char *hostname,
int port, int ip_version)
{
(void)ip_version;
*waitp = 0; /* default to synchronous response */
/* fire up a new resolver thread! */
if(async_thrdd_init(data, hostname, port, ip_version, NULL)) {
*waitp = 1; /* expect asynchronous response */
return NULL;
return CURLE_OK;
}
failf(data, "getaddrinfo() thread failed");
return NULL;
return CURLE_FAILED_INIT;
}
#else /* !HAVE_GETADDRINFO */