summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2020-05-24 13:55:02 +0200
committerAndrew Bartlett <abartlet@samba.org>2020-05-24 23:55:36 +0000
commit22870830159a753a70e197f7abe671a1d642f00e (patch)
tree8e21bb4cc6166daf56b918a43381c34b25372403 /lib/tdb
parentf133019db60afb0fea997dd6350a9376a91806d3 (diff)
downloadsamba-22870830159a753a70e197f7abe671a1d642f00e.tar.gz
tdb: also use __has_attribute macro to check for attribute support
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/include/tdb.h2
1 files changed, 1 insertions, 1 deletions
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