From e48663248c22d17436b93f8f7069dad87a196ce1 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 30 Jan 2026 17:33:13 -0600 Subject: [PATCH] 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. --- wolfssl/wolfcrypt/types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index df1f82d2a..6ba7f8466 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -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 #endif #if (defined(__cplusplus) && (__cplusplus >= 201703L)) || \