From 4c9b0742f5796bb82268166c723e83f7e239d40d Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Wed, 1 Jun 2022 17:55:48 +0200 Subject: [PATCH] rwonce.h: __error__ attribute fix --- c/rwonce.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/c/rwonce.h b/c/rwonce.h index d21656b..90a28bc 100644 --- a/c/rwonce.h +++ b/c/rwonce.h @@ -24,8 +24,12 @@ #ifndef __BR_RWONCE_H #define __BR_RWONCE_H -/************ originally in */ -# define __compiletime_error(message) __attribute__((error(message))) +/************ originally in */ +#if __has_attribute(__error__) +# define __compiletime_error(msg) __attribute__((__error__(msg))) +#else +# define __compiletime_error(msg) +#endif /************ originally in */ /*