From: Alejandro Colomar Date: Thu, 7 Aug 2025 12:24:13 +0000 (+0200) Subject: lib/attr.h: __has_c_attribute(): Define fallback X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d02454bbbe97130a5172211c14932c3a516c122;p=thirdparty%2Fshadow.git lib/attr.h: __has_c_attribute(): Define fallback This allows using __has_c_attribute() in compilers that don't have it. Signed-off-by: Alejandro Colomar --- diff --git a/lib/attr.h b/lib/attr.h index d7237722d..2dce14114 100644 --- a/lib/attr.h +++ b/lib/attr.h @@ -5,6 +5,11 @@ #include "config.h" +#if !defined(__has_c_attribute) +# define __has_c_attribute(x) 0 +#endif + + #if (__GNUC__ >= 10) # define MAYBE_UNUSED [[gnu::unused]] # define NORETURN [[gnu::__noreturn__]]