From 7b850f75de6cdb1188465319e8f8ce3af8f3b380 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 17 Dec 2024 11:00:07 -0500 Subject: [PATCH] includes: work around CLANG_PREREQ() double-definition Right now when doing test builds with clang, we wind up getting an error from two different definitions of CLANG_PREREQ() in the headers. It might be that we can just rip one of these out, but for now I'm just making one of them conditional. Signed-off-by: Peter Jones --- include/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/compiler.h b/include/compiler.h index 8e8a658d8..982bc2359 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -205,6 +205,7 @@ #define GNUC_PREREQ(maj, min) 0 #endif +#if !defined(CLANG_PREREQ) #if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__) #define CLANG_PREREQ(maj, min) \ ((__clang_major__ > (maj)) || \ @@ -212,6 +213,7 @@ #else #define CLANG_PREREQ(maj, min) 0 #endif +#endif /* CLANG_PREREQ */ #if GNUC_PREREQ(5, 1) || CLANG_PREREQ(3, 8) #define checked_add(addend0, addend1, sum) \