diff --git a/userspace/libraries/LibC/include/assert.h b/userspace/libraries/LibC/include/assert.h index 8b4be91d..6b9732a7 100644 --- a/userspace/libraries/LibC/include/assert.h +++ b/userspace/libraries/LibC/include/assert.h @@ -1,3 +1,11 @@ +#ifndef assert +#ifdef NDEBUG + #define assert(ignore) ((void)0) +#else + #define assert(expr) ((expr) ? (void)0 : __assert_fail(#expr, __FILE__, __LINE__, __func__)) +#endif +#endif + #ifndef _ASSERT_H #define _ASSERT_H 1 @@ -5,12 +13,6 @@ #include -#ifdef NDEBUG - #define assert(ignore) ((void)0) -#else - #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