]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/attr.h: use C23 attributes only with gcc >= 10
authorAlexander Kanavin <alex@linutronix.de>
Tue, 7 Jan 2025 16:03:32 +0000 (17:03 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 8 Jan 2025 16:18:27 +0000 (17:18 +0100)
These are not available on earlier versions and builds break there.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
lib/attr.h

index 02c7e2522200d76a97644e6be42a8dafd931fdc3..d7237722dc497c12015fc036fe3ba576f6a8bcb3 100644 (file)
@@ -5,7 +5,7 @@
 #include "config.h"
 
 
-#if defined(__GNUC__)
+#if (__GNUC__ >= 10)
 # define MAYBE_UNUSED                [[gnu::unused]]
 # define NORETURN                    [[gnu::__noreturn__]]
 # define format_attr(type, fmt, va)  [[gnu::format(type, fmt, va)]]