From 34c82275bae6a1ff1350af036bfb5127f6bc1407 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 20 Nov 2019 21:04:22 +0000 Subject: Avoid gnu_printf attribute when using Clang Clang does not support gnu_printf, so just use printf when using it to compile. Signed-off-by: Ed Maste Message-Id: <20191120210422.61327-1-emaste@freefall.freebsd.org> Signed-off-by: David Gibson --- util.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 347b305..5a4172d 100644 --- a/util.h +++ b/util.h @@ -12,7 +12,11 @@ */ #ifdef __GNUC__ +#ifdef __clang__ +#define PRINTF(i, j) __attribute__((format (printf, i, j))) +#else #define PRINTF(i, j) __attribute__((format (gnu_printf, i, j))) +#endif #define NORETURN __attribute__((noreturn)) #else #define PRINTF(i, j) -- cgit v1.1