From: Viktor Szakats Date: Sun, 27 Jul 2025 22:22:36 +0000 (+0200) Subject: config-win32.h: do not use winsock2 `inet_ntop()`/`inet_pton()` X-Git-Tag: curl-8_16_0~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36af5cceb11f0b8757a5a4fcdcc1974f6b3cda2f;p=thirdparty%2Fcurl.git config-win32.h: do not use winsock2 `inet_ntop()`/`inet_pton()` Syncing winbuild and VS Project File builds with the same fix applied to cmake and autotools builds earlier. Also fixes these warnings seen in the VisualStudioSolution (VS2013) job on AppVeyor CI: ``` lib\hostip.c(148): warning C4090: 'function' : different 'const' qualifiers lib\hostip.c(155): warning C4090: 'function' : different 'const' qualifiers ``` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/52470650/job/gslnjrdxnd8b9mtv#L180 Went unnoticed because warnings are not promoted to error in these builds. winbuild CI jobs did not hit this warning for some reason. Follow-up to 8537a5b0bcf4565551774c2b2375c49767e405a7 #16577 Closes #18045 --- diff --git a/lib/config-win32.h b/lib/config-win32.h index 68377025db..b7f83927a4 100644 --- a/lib/config-win32.h +++ b/lib/config-win32.h @@ -264,13 +264,11 @@ #define HAVE_SNPRINTF 1 #endif -/* Vista */ -#if (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600) && !defined(UNDER_CE) +/* Must always use local implementations on Windows. */ /* Define to 1 if you have an IPv6 capable working inet_ntop function. */ -#define HAVE_INET_NTOP 1 +/* #undef HAVE_INET_NTOP */ /* Define to 1 if you have an IPv6 capable working inet_pton function. */ -#define HAVE_INET_PTON 1 -#endif +/* #undef HAVE_INET_PTON */ /* Define to 1 if you have the `basename' function. */ #ifdef __MINGW32__