headers: Define static_assert for C11
Defines the `static_assert` macro in `assert.h` as required by the C11 standard. Change-Id: Ic25dc99537f995404b7b4280b72c6000a293a1df Reviewed-on: https://review.haiku-os.org/c/haiku/+/6916 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
This commit is contained in:
parent
c079e6936f
commit
ea2870c839
@ -51,3 +51,7 @@ extern void __assert_perror_fail(int error, const char *file,
|
||||
#else /* NDEBUG */
|
||||
# define assert(condition) ((void)0)
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(static_assert)
|
||||
# define static_assert _Static_assert
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user