From 9eff3c968015182b246427c4c97e56a4dfd2ac72 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 7 Aug 2025 14:34:14 +0200 Subject: [PATCH] lib/attr.h: ATTR_ALLOC_SIZE(): Use it also with Clang Signed-off-by: Alejandro Colomar --- lib/attr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/attr.h b/lib/attr.h index c08e9ff31..367e6ceca 100644 --- a/lib/attr.h +++ b/lib/attr.h @@ -34,7 +34,7 @@ # define ATTR_ACCESS(...) #endif -#if (__GNUC__ >= 10) +#if __has_c_attribute(gnu::alloc_size) # define ATTR_ALLOC_SIZE(...) [[gnu::alloc_size(__VA_ARGS__)]] #else # define ATTR_ALLOC_SIZE(...) -- 2.47.3