summaryrefslogtreecommitdiff
path: root/include/assert.h
diff options
context:
space:
mode:
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>2022-06-23 17:21:11 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2022-06-29 13:20:13 +0200
commit03fbd941e943976bb92cb392882c2ff7ec218704 (patch)
tree6cd8c461303a870ce3d7d145e51ea901cba27aa6 /include/assert.h
parent6561433a6680b34c04dd4581e340f96cc7dfb04c (diff)
assert: Add static_assert macro
See the C11 standard 7.2 ยง3 The definition is copied from glibc. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Diffstat (limited to 'include/assert.h')
-rw-r--r--include/assert.h5
1 files changed, 5 insertions, 0 deletions
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