From 86f5bd3c6e67809e4feac4df42e422c54277df05 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 21 Aug 2025 13:59:46 +0200 Subject: [PATCH] curl_setup.h: fix `FMT_SOCKET_T` to be unsigned on Windows To match the Windows socket type. Ref: https://learn.microsoft.com/windows/win32/winsock/socket-data-type-2 Cherry-picked from #18343 Closes #19881 --- lib/curl_setup.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/curl_setup.h b/lib/curl_setup.h index c4be90b655..829650aee4 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -519,9 +519,13 @@ #endif #if SIZEOF_CURL_SOCKET_T < 8 +#ifdef _WIN32 +# define FMT_SOCKET_T "u" +#else # define FMT_SOCKET_T "d" -#elif defined(__MINGW32__) -# define FMT_SOCKET_T "zd" +#endif +#elif defined(_WIN32) +# define FMT_SOCKET_T "zu" #else # define FMT_SOCKET_T "qd" #endif -- 2.47.3