From 6dc3f4f582e8982b0142ebd1181ddabade0faf69 Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Fri, 15 Nov 2019 17:18:24 -0700 Subject: [PATCH] osdep: Define __USE_MINGW_ANSI_STDIO before includes This patch moves the definition of __USE_MINGW_ANSI_STDIO to precede inclusion of any headers. This is done to prevent stdio.h from assigning a default value which was previously conflicting with our unconditional definition, resulting in numerous compiler warnings. --- include/qemu/osdep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 303d315c5d..af2b91f0b8 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -85,17 +85,17 @@ extern int daemon(int, int); #endif #endif +/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ +#ifdef __MINGW32__ +#define __USE_MINGW_ANSI_STDIO 1 +#endif + #include #include #include #include #include #include - -/* enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later) */ -#ifdef __MINGW32__ -#define __USE_MINGW_ANSI_STDIO 1 -#endif #include #include