summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMițca Dumitru <dumitru0mitca@gmail.com>2021-03-07 16:54:38 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-08 08:56:15 +0100
commit35829304d6d8edee15d03845b5e9f1a3b6bdab3e (patch)
treec85d5d9e7016b41945b5fceea735b218f0b1e149
parent8cc279ed74dc0b16a187052d2454c26c8c6ecaf2 (diff)
downloadserenity-35829304d6d8edee15d03845b5e9f1a3b6bdab3e.zip
LibC: Define static_assert in assert.h when it's being used in C
-rw-r--r--Userland/Libraries/LibC/assert.h4
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