diff --git a/include/assert.h b/include/assert.h index b7098a906e6..51dae09542e 100644 --- a/include/assert.h +++ b/include/assert.h @@ -77,7 +77,13 @@ */ #ifndef __cplusplus -# define static_assert _Static_assert +# if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L +# define static_assert _Static_assert +# else +# define static_assert(cond, msg) \ + extern int (*__static_assert_function (void)) \ + [!!sizeof (struct { int __error_if_negative: (cond) ? 2 : -1; })] +# endif #endif /****************************************************************************