From aa035ae570f5576f14963fc977bd2611bb0026cb Mon Sep 17 00:00:00 2001 From: jordan Date: Wed, 9 Sep 2026 22:41:04 -0500 Subject: [PATCH] bsdkm: wc_static_assert define. --- wolfssl/wolfcrypt/types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wolfssl/wolfcrypt/types.h b/wolfssl/wolfcrypt/types.h index 726f715877b..2ccaa95b98a 100644 --- a/wolfssl/wolfcrypt/types.h +++ b/wolfssl/wolfcrypt/types.h @@ -2436,6 +2436,14 @@ WOLFSSL_API word32 CheckRunTimeSettings(void); wc_static_assert2(__builtin_choose_expr( \ WC_IS_CONSTEXPR(expr), expr, 1), msg) #endif + #elif defined(WOLFSSL_BSDKM) + /* from CTASSERT(9), FreeBSD Kernel Developer's Manual: + * The CTASSERT() macro is deprecated and the C11 standard + * _Static_assert() should be used instead. */ + #define wc_static_assert(expr) _Static_assert(expr, #expr) + #ifndef wc_static_assert2 + #define wc_static_assert2(expr, msg) _Static_assert(expr, msg) + #endif #else #ifdef __COUNTER__ #define wc_static_assert(expr) \