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.

This commit is contained in:
Daniel Pouzzner
2026-01-30 17:33:13 -06:00
parent 1feb7d247d
commit e48663248c

View File

@@ -2105,7 +2105,9 @@ WOLFSSL_API word32 CheckRunTimeSettings(void);
#define wc_static_assert(expr) struct wc_static_assert_dummy_struct
#define wc_static_assert2(expr, msg) wc_static_assert(expr)
#elif !defined(wc_static_assert)
#if defined(WOLFSSL_HAVE_ASSERT_H) && !defined(WOLFSSL_NO_ASSERT_H)
#if !defined(WOLFSSL_NO_ASSERT_H) && (defined(WOLFSSL_HAVE_ASSERT_H) || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \
(defined(__cplusplus) && (__cplusplus >= 201103L)))
#include <assert.h>
#endif
#if (defined(__cplusplus) && (__cplusplus >= 201703L)) || \