aboutsummaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler.h b/compiler.h
index 07ba1f8113..c734a71c67 100644
--- a/compiler.h
+++ b/compiler.h
@@ -44,6 +44,11 @@
/* Use gnu_printf when supported (qemu uses standard format strings). */
# define GCC_ATTR __attribute__((__unused__, format(gnu_printf, 1, 2)))
# define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
+# if defined(_WIN32)
+ /* Map __printf__ to __gnu_printf__ because we want standard format strings
+ * even when MinGW or GLib include files use __printf__. */
+# define __printf__ __gnu_printf__
+# endif
# endif
#if defined(_WIN32)
#define GCC_WEAK __attribute__((weak))