aboutsummaryrefslogtreecommitdiff
path: root/scripts/dtc/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/util.h')
-rw-r--r--scripts/dtc/util.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/dtc/util.h b/scripts/dtc/util.h
index 9d38edee9736..b448cd79efd3 100644
--- a/scripts/dtc/util.h
+++ b/scripts/dtc/util.h
@@ -13,7 +13,9 @@
*/
#ifdef __GNUC__
-#if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+#ifdef __MINGW_PRINTF_FORMAT
+#define PRINTF(i, j) __attribute__((format (__MINGW_PRINTF_FORMAT, i, j)))
+#elif __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
#define PRINTF(i, j) __attribute__((format (gnu_printf, i, j)))
#else
#define PRINTF(i, j) __attribute__((format (printf, i, j)))
@@ -65,7 +67,7 @@ extern char *xstrndup(const char *s, size_t len);
extern int PRINTF(2, 3) xasprintf(char **strp, const char *fmt, ...);
extern int PRINTF(2, 3) xasprintf_append(char **strp, const char *fmt, ...);
-extern int xavsprintf_append(char **strp, const char *fmt, va_list ap);
+extern int PRINTF(2, 0) xavsprintf_append(char **strp, const char *fmt, va_list ap);
extern char *join_path(const char *path, const char *name);
/**