]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: also use portable __has_attribute macro to check for attribute support
authorBjörn Jacke <bj@sernet.de>
Sun, 24 May 2020 12:04:37 +0000 (14:04 +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/ldb/include/ldb.h

index 3cba0f4d5439745c35683d7e7600ff1a615866bb..7f53e6420e1c0bafd3313e522eefee77d99b5ba6 100644 (file)
@@ -89,7 +89,7 @@ struct ldb_val {
 #endif
 
 #ifndef _DEPRECATED_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#if __has_attribute(deprecated) || ( (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) )
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_