This fixes warnings generated when compiling with mingw-w64 regarding
printf format specifiers that are not available with base msvcrt.
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
// This code generates an assembly file which provides offsets to get struct members from assembly code.
+// __USE_MINGW_ANSI_STDIO is needed to use the %zu format specifier with mingw-w64.
+// Otherwise the compiler will complain about an unknown format specifier.
+#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO)
+#define __USE_MINGW_ANSI_STDIO 1
+#endif
+
#include <stdio.h>
#include "loader_common.h"
#include "log.h"