Skip to content

Commit e443ef0

Browse files
committed
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.
1 parent f2b9e3d commit e443ef0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wolfssl/wolfio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ WOLFSSL_API void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
10191019
#if (defined(__MINGW32__) || defined(__MINGW64__)) && !defined(UNICODE)
10201020
#define XINET_PTON(a,b,c) InetPton((a),(b),(c))
10211021
#else
1022-
#define XINET_PTON(a,b,c) InetPton((a),(PCWSTR)(b),(c))
1022+
#define XINET_PTON(a,b,c) InetPtonA((a),(b),(c))
10231023
#endif
10241024
#elif defined(FREESCALE_MQX)
10251025
#define XINET_PTON(a,b,c,d) inet_pton((a),(b),(c),(d))

0 commit comments

Comments
 (0)