From: Alejandro Colomar Date: Sun, 5 Oct 2025 08:09:04 +0000 (+0200) Subject: lib/attr.h: ATTR_NONSTRING: Add attribute [[gnu::nonstring]] X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82f73b89b237d17a0613fda00f9ac774e0c5b0df;p=thirdparty%2Fshadow.git lib/attr.h: ATTR_NONSTRING: Add attribute [[gnu::nonstring]] Signed-off-by: Alejandro Colomar --- diff --git a/lib/attr.h b/lib/attr.h index 2dce14114..8150ddb60 100644 --- a/lib/attr.h +++ b/lib/attr.h @@ -36,5 +36,11 @@ # define ATTR_STRING(i) #endif +#if __has_c_attribute(gnu::nonstring) +# define ATTR_NONSTRING [[gnu::nonstring]] +#else +# define ATTR_NONSTRING +#endif + #endif // include guard