From: Christopher Degawa Date: Mon, 2 Oct 2023 04:37:04 +0000 (-0500) Subject: loader/asm_offset: Add __USE_MINGW_ANSI_STDIO X-Git-Tag: upstream/1.3.268~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a03592fce35714609575d583633c9fe5161c5e9;p=platform%2Fupstream%2FVulkan-Loader.git loader/asm_offset: Add __USE_MINGW_ANSI_STDIO 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 --- diff --git a/loader/asm_offset.c b/loader/asm_offset.c index a4b49332..f99ff56a 100644 --- a/loader/asm_offset.c +++ b/loader/asm_offset.c @@ -22,6 +22,12 @@ // 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 #include "loader_common.h" #include "log.h"