]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/attr.h: ATTR_STRING(): Use it also with Clang
authorAlejandro Colomar <alx@kernel.org>
Thu, 7 Aug 2025 12:35:01 +0000 (14:35 +0200)
committerSerge Hallyn <serge@hallyn.com>
Fri, 28 Nov 2025 02:35:26 +0000 (20:35 -0600)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/attr.h

index 367e6ceca3cd461049bb6e6db317c25567b87d23..dbb97082f830ae43e15fdb672551452d84f4aeb3 100644 (file)
@@ -46,7 +46,7 @@
 # define ATTR_MALLOC(deallocator)
 #endif
 
-#if (__GNUC__ >= 14)
+#if __has_c_attribute(gnu::null_terminated_string_arg)
 # define ATTR_STRING(i)              [[gnu::null_terminated_string_arg(i)]]
 #else
 # define ATTR_STRING(i)