From c012c6062e963085f915975464e887264bf741fd Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Wed, 5 Feb 2025 10:46:30 +0100 Subject: [PATCH] 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 0d4fdbf15d8. Closes https://github.com/curl/curl/pull/16179 --- lib/asyn-thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 8383edad72..986fc355c1 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -668,9 +668,11 @@ int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *socks) timediff_t milli; timediff_t ms; struct resdata *reslv = (struct resdata *)data->state.async.resolver; - int socketi = 0; #ifndef CURL_DISABLE_SOCKETPAIR struct thread_data *td = data->state.async.tdata; +#endif +#if !defined(CURL_DISABLE_SOCKETPAIR) || defined(USE_HTTPSRR_ARES) + int socketi = 0; #else (void)socks; #endif