From e443ef0304749002bb757cb2930e3edf5a1a5692 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 3 Apr 2026 15:25:14 +0200 Subject: [PATCH] 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. --- wolfssl/wolfio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfssl/wolfio.h b/wolfssl/wolfio.h index c215fa0b89..98415d012a 100644 --- a/wolfssl/wolfio.h +++ b/wolfssl/wolfio.h @@ -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))