Use InetPtonA for XINET_PTON macro on Windows

Explicitly call the ANSI version of the InetPton function to avoid an incorrect cast to PCWSTR when the input string is a standard character pointer.
This commit is contained in:
Juliusz Sosinowicz
2026-04-03 15:25:14 +02:00
parent f2b9e3d654
commit e443ef0304
+1 -1
View File
@@ -1019,7 +1019,7 @@ WOLFSSL_API void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
#if (defined(__MINGW32__) || defined(__MINGW64__)) && !defined(UNICODE)
#define XINET_PTON(a,b,c) InetPton((a),(b),(c))
#else
#define XINET_PTON(a,b,c) InetPton((a),(PCWSTR)(b),(c))
#define XINET_PTON(a,b,c) InetPtonA((a),(b),(c))
#endif
#elif defined(FREESCALE_MQX)
#define XINET_PTON(a,b,c,d) inet_pton((a),(b),(c),(d))