summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ruby/defines.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 5774870e76..f5fd5bfcef 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -90,8 +90,13 @@ extern "C" {
#endif /* __GNUC__ >= 3 */
#ifdef __GNUC__
+#ifdef __MINGW32__
+#define PRINTF_ARGS(decl, string_index, first_to_check) \
+ decl __attribute__((format(gnu_printf, string_index, first_to_check)))
+#else
#define PRINTF_ARGS(decl, string_index, first_to_check) \
decl __attribute__((format(printf, string_index, first_to_check)))
+#endif
#else
#define PRINTF_ARGS(decl, string_index, first_to_check) decl
#endif