talloc: also use portable __has_attribute macro to check for "deprecated" attribute
authorBjörn Jacke <bj@sernet.de>
Thu, 8 Oct 2020 10:05:41 +0000 (12:05 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Oct 2020 04:45:40 +0000 (04:45 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14526

Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/talloc/talloc.h

index 0154bf3bbf61e7ad45aed67f308dfc3f19aa3282..afa0e85d1957d5f443c5984f12e143534fd9d53c 100644 (file)
@@ -107,7 +107,7 @@ typedef void TALLOC_CTX;
 #endif
 
 #ifndef _DEPRECATED_
-#ifdef HAVE___ATTRIBUTE__
+#if __has_attribute(deprecated) || (__GNUC__ >= 3)
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_