diff options
author | Mițca Dumitru <dumitru0mitca@gmail.com> | 2021-03-07 16:54:38 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-08 08:56:15 +0100 |
commit | 35829304d6d8edee15d03845b5e9f1a3b6bdab3e (patch) | |
tree | c85d5d9e7016b41945b5fceea735b218f0b1e149 | |
parent | 8cc279ed74dc0b16a187052d2454c26c8c6ecaf2 (diff) | |
download | serenity-35829304d6d8edee15d03845b5e9f1a3b6bdab3e.zip |
LibC: Define static_assert in assert.h when it's being used in C
-rw-r--r-- | Userland/Libraries/LibC/assert.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/assert.h b/Userland/Libraries/LibC/assert.h index 9515210309..572a35632a 100644 --- a/Userland/Libraries/LibC/assert.h +++ b/Userland/Libraries/LibC/assert.h @@ -52,4 +52,8 @@ __attribute__((noreturn)) void __assertion_failed(const char* msg); #define VERIFY assert #define TODO VERIFY_NOT_REACHED +#ifndef __cplusplus +# define static_assert _Static_assert +#endif + __END_DECLS |