From 15524dd6138267dc20dac793ff5e40c85fe91621 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 7 Jan 2025 17:03:32 +0100 Subject: [PATCH] lib/attr.h: use C23 attributes only with gcc >= 10 These are not available on earlier versions and builds break there. Signed-off-by: Alexander Kanavin --- lib/attr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/attr.h b/lib/attr.h index 02c7e2522..d7237722d 100644 --- a/lib/attr.h +++ b/lib/attr.h @@ -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)]]