From 03fbd941e943976bb92cb392882c2ff7ec218704 Mon Sep 17 00:00:00 2001 From: Nicolas Cavallari Date: Thu, 23 Jun 2022 17:21:11 +0200 Subject: assert: Add static_assert macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See the C11 standard 7.2 ยง3 The definition is copied from glibc. Signed-off-by: Nicolas Cavallari --- include/assert.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/assert.h b/include/assert.h index ee8e85fa2..fd71e833b 100644 --- a/include/assert.h +++ b/include/assert.h @@ -76,3 +76,8 @@ __END_DECLS # endif #endif /* NDEBUG. */ + +#if defined __USE_ISOC11 && !defined __cplusplus +# undef static_assert +# define static_assert _Static_assert +#endif -- cgit v1.2.3