Merge pull request #10165 from davidhorstmann-arm/fix-mingw-ansi-stdio-3.6

[3.6] Fix format specifiers for MinGW ANSI stdio
This commit is contained in:
David Horstmann
2026-01-28 16:42:07 +00:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
Bugfix
* Fix a build failure with MinGW when the __USE_MINGW_ANSI_STDIO option
is set. This was caused by the wrong format specifier being used to
print long long values (MBEDTLS_PRINTF_LONGLONG).

View File

@@ -111,7 +111,7 @@
#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)
#include <inttypes.h>
#define MBEDTLS_PRINTF_SIZET PRIuPTR
#define MBEDTLS_PRINTF_LONGLONG "I64d"
#define MBEDTLS_PRINTF_LONGLONG PRId64
#else \
/* defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900) */
#define MBEDTLS_PRINTF_SIZET "zu"