asyn-thread: fix build with CURL_DISABLE_SOCKETPAIR

With `CURL_DISABLE_SOCKETPAIR` defined and `USE_HTTPSRR_ARES`
undefined, the local variable `socketi` was unused.

This fixes a regression from commit 0d4fdbf15d.

Closes https://github.com/curl/curl/pull/16179
This commit is contained in:
Marcel Raad 2025-02-05 10:46:30 +01:00
parent 13b2ea68f0
commit c012c6062e
No known key found for this signature in database
GPG Key ID: 33C416EFAE4D6F02

View File

@ -668,9 +668,11 @@ int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *socks)
timediff_t milli; timediff_t milli;
timediff_t ms; timediff_t ms;
struct resdata *reslv = (struct resdata *)data->state.async.resolver; struct resdata *reslv = (struct resdata *)data->state.async.resolver;
int socketi = 0;
#ifndef CURL_DISABLE_SOCKETPAIR #ifndef CURL_DISABLE_SOCKETPAIR
struct thread_data *td = data->state.async.tdata; struct thread_data *td = data->state.async.tdata;
#endif
#if !defined(CURL_DISABLE_SOCKETPAIR) || defined(USE_HTTPSRR_ARES)
int socketi = 0;
#else #else
(void)socks; (void)socks;
#endif #endif