Browse Source

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>
main
Ed Maste 5 years ago committed by David Gibson
parent
commit
34c82275ba
  1. 4
      util.h

4
util.h

@ -12,7 +12,11 @@ @@ -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…
Cancel
Save