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:
parent
743000931b
commit
34c82275ba
1 changed files with 4 additions and 0 deletions
4
util.h
4
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)
|
||||
|
|
Loading…
Reference in a new issue