replace: also use portable __has_attribute macro to check for "deprecated" attribute
authorBjörn Jacke <bj@sernet.de>
Thu, 8 Oct 2020 10:10:35 +0000 (12:10 +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/replace/replace.h

index 6c78311f2d3238dd4203597fec032c2b16203878..f7f6b65386985a4225ae88145241f4d01075af17 100644 (file)
@@ -465,7 +465,7 @@ int rep_dlclose(void *handle);
 #endif
 
 #ifndef _DEPRECATED_
-#ifdef HAVE___ATTRIBUTE__
+#if __has_attribute(deprecated) || (__GNUC__ >= 3)
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_