diff --git a/modules/hal_rpi_pico/pico/config_autogen.h b/modules/hal_rpi_pico/pico/config_autogen.h index 39c436f9539..e8fe4d17579 100644 --- a/modules/hal_rpi_pico/pico/config_autogen.h +++ b/modules/hal_rpi_pico/pico/config_autogen.h @@ -22,7 +22,9 @@ * BUILD_ASSERT is included through toolchain.h. */ #include +#if !defined(__cplusplus) && !defined(static_assert) #define static_assert(expr, msg...) BUILD_ASSERT((expr), "" msg) +#endif /* static_assert && __cplusplus__ */ /* Convert uses of asm, which is not supported in c99, to __asm */ #define asm __asm