aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive_fe/err.h
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive_fe/err.h')
-rw-r--r--libarchive_fe/err.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libarchive_fe/err.h b/libarchive_fe/err.h
index ebf5de814f5e..c663103b0b44 100644
--- a/libarchive_fe/err.h
+++ b/libarchive_fe/err.h
@@ -35,9 +35,14 @@
#if defined(__GNUC__) && (__GNUC__ > 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
-#define __LA_PRINTFLIKE(f,a) __attribute__((__format__(__printf__, f, a)))
+# ifdef __MINGW_PRINTF_FORMAT
+# define __LA_PRINTF_FORMAT __MINGW_PRINTF_FORMAT
+# else
+# define __LA_PRINTF_FORMAT __printf__
+# endif
+# define __LA_PRINTFLIKE(f,a) __attribute__((__format__(__LA_PRINTF_FORMAT, f, a)))
#else
-#define __LA_PRINTFLIKE(f,a)
+# define __LA_PRINTFLIKE(f,a)
#endif
void lafe_warnc(int code, const char *fmt, ...) __LA_PRINTFLIKE(2, 3);