From 6fbf1469aa3f4c310b223d97c860f175407ec71a Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 27 Dec 2025 23:46:25 +0200 Subject: [PATCH] LibC: define static_assert in assert.h This is needed from C11 until C23 --- userspace/libraries/LibC/include/assert.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/userspace/libraries/LibC/include/assert.h b/userspace/libraries/LibC/include/assert.h index 457bb2ba..8b4be91d 100644 --- a/userspace/libraries/LibC/include/assert.h +++ b/userspace/libraries/LibC/include/assert.h @@ -11,6 +11,10 @@ #define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__)) #endif +#if !defined(__cplusplus) && __STDC_VERSION__ >= 201112L && __STDC_VERSION__ < 202311L + #define static_assert _Static_assert +#endif + __BEGIN_DECLS __attribute__((noreturn))