Skip to content

Commit e486632

Browse files
committed
wolfssl/wolfcrypt/types.h: in setup for wc_static_assert, include assert.h if __STDC_VERSION__ or __cplusplus denotes presence, even if WOLFSSL_HAVE_ASSERT_H is unset.
1 parent 1feb7d2 commit e486632

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

wolfssl/wolfcrypt/types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,9 @@ WOLFSSL_API word32 CheckRunTimeSettings(void);
21052105
#define wc_static_assert(expr) struct wc_static_assert_dummy_struct
21062106
#define wc_static_assert2(expr, msg) wc_static_assert(expr)
21072107
#elif !defined(wc_static_assert)
2108-
#if defined(WOLFSSL_HAVE_ASSERT_H) && !defined(WOLFSSL_NO_ASSERT_H)
2108+
#if !defined(WOLFSSL_NO_ASSERT_H) && (defined(WOLFSSL_HAVE_ASSERT_H) || \
2109+
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
2110+
(defined(__cplusplus) && (__cplusplus >= 201103L)))
21092111
#include <assert.h>
21102112
#endif
21112113
#if (defined(__cplusplus) && (__cplusplus >= 201703L)) || \

0 commit comments

Comments
 (0)