From ea4e7b266978e6db5e929fe625db4fb6823d9221 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Mon, 26 Aug 2019 13:19:53 -0600 Subject: [PATCH] Resolve XSNPRINTF unconditional use in asn.c breaking mingw32 builds --- wolfssl/wolfcrypt/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 0b4caf6ca..24aa6b4b4 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -440,8 +440,8 @@ #define XSNPRINTF snprintf #endif #else - #ifdef _MSC_VER - #if (_MSC_VER >= 1900) + #if defined(_MSC_VER) || defined(__GNUC__) || defined(__MINGW32__) + #if defined(_MSC_VER) && (_MSC_VER >= 1900) /* Beginning with the UCRT in Visual Studio 2015 and Windows 10, snprintf is no longer identical to _snprintf. The snprintf function behavior is now @@ -467,7 +467,7 @@ } #define XSNPRINTF xsnprintf #endif /* (_MSC_VER >= 1900) */ - #endif /* _MSC_VER */ + #endif /* _MSC_VER || __GNUC__ || __MINGW32__ */ #endif /* USE_WINDOWS_API */ #if defined(WOLFSSL_CERT_EXT) || defined(HAVE_ALPN)