]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tdb: also use __has_attribute macro to check for attribute support
authorBjörn Jacke <bj@sernet.de>
Sun, 24 May 2020 11:55:02 +0000 (13:55 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 24 May 2020 23:55:36 +0000 (23:55 +0000)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/tdb/include/tdb.h

index 825ceedd9b443d3fb8daa64452a76a865b9ea467..9d63a96b4accd2fb7fdfdf410e7c76406548655e 100644 (file)
@@ -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