From: Björn Jacke Date: Sun, 24 May 2020 11:55:02 +0000 (+0200) Subject: tdb: also use __has_attribute macro to check for attribute support X-Git-Tag: ldb-2.2.0~351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22870830159a753a70e197f7abe671a1d642f00e;p=thirdparty%2Fsamba.git tdb: also use __has_attribute macro to check for attribute support Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h index 825ceedd9b4..9d63a96b4ac 100644 --- a/lib/tdb/include/tdb.h +++ b/lib/tdb/include/tdb.h @@ -102,7 +102,7 @@ typedef struct TDB_DATA { } TDB_DATA; #ifndef PRINTF_ATTRIBUTE -#if (__GNUC__ >= 3) +#if __has_attribute(format) || (__GNUC__ >= 3) /** Use gcc attribute to check printf fns. a1 is the 1-based index of * the parameter containing the format, and a2 the index of the first * argument. Note that some gcc 2.x versions don't handle this