From: Björn Jacke Date: Thu, 8 Oct 2020 10:10:35 +0000 (+0200) Subject: replace: also use portable __has_attribute macro to check for "deprecated" attribute X-Git-Tag: talloc-2.3.2~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de748864201167ac1b4ecf4f121fbe2b110103e5;p=thirdparty%2Fsamba.git replace: also use portable __has_attribute macro to check for "deprecated" attribute BUG: https://bugzilla.samba.org/show_bug.cgi?id=14526 Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 6c78311f2d3..f7f6b653869 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -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_