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 <emaste@freebsd.org>
Message-Id: <20191120210422.61327-1-emaste@freefall.freebsd.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Ed Maste 2019-11-20 21:04:22 +00:00 committed by David Gibson
parent 743000931b
commit 34c82275ba

4
util.h
View file

@ -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)