Merge "Use format(gnu_printf, ...) for windows build with __USE_MINGW_ANSI_STDIO"
diff --git a/include/android/log.h b/include/android/log.h
index f5b1900..ad36bd2 100644
--- a/include/android/log.h
+++ b/include/android/log.h
@@ -98,8 +98,12 @@
  */
 int __android_log_print(int prio, const char *tag,  const char *fmt, ...)
 #if defined(__GNUC__)
+#if __USE_MINGW_ANSI_STDIO
+    __attribute__ ((format(gnu_printf, 3, 4)))
+#else
     __attribute__ ((format(printf, 3, 4)))
 #endif
+#endif
     ;
 
 /*
@@ -117,8 +121,12 @@
                           const char *fmt, ...)
 #if defined(__GNUC__)
     __attribute__ ((noreturn))
+#if __USE_MINGW_ANSI_STDIO
+    __attribute__ ((format(gnu_printf, 3, 4)))
+#else
     __attribute__ ((format(printf, 3, 4)))
 #endif
+#endif
     ;
 
 #ifdef __cplusplus