diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h index a121654e2..24c63625f 100644 --- a/include/mbedtls/platform.h +++ b/include/mbedtls/platform.h @@ -64,10 +64,6 @@ extern "C" { #define MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF #endif -#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO) -#define __USE_MINGW_ANSI_STDIO 1 -#endif - #if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #include #include diff --git a/library/platform.c b/library/platform.c index 4f8e40f30..8bf6ff5fb 100644 --- a/library/platform.c +++ b/library/platform.c @@ -30,6 +30,10 @@ #include "mbedtls/platform.h" #include "mbedtls/platform_util.h" +#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO) +#define __USE_MINGW_ANSI_STDIO 1 +#endif + #if defined(MBEDTLS_PLATFORM_MEMORY) #if !defined(MBEDTLS_PLATFORM_STD_CALLOC) static void *platform_calloc_uninit( size_t n, size_t size )