]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_setup.h: fix `FMT_SOCKET_T` to be unsigned on Windows
authorViktor Szakats <commit@vsz.me>
Thu, 21 Aug 2025 11:59:46 +0000 (13:59 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 9 Dec 2025 08:20:10 +0000 (09:20 +0100)
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

index c4be90b655e08312b95b306a03cd97b9af284ff4..829650aee4d464464e0cf1ab362d8c5d69a22397 100644 (file)
 #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