From 314ecba388fe70e4da20b14b6b740b9290078173 Mon Sep 17 00:00:00 2001 From: Daniel Mangum <31777345+hasheddan@users.noreply.github.com> Date: Thu, 9 Nov 2023 19:43:48 -0800 Subject: [PATCH] Fix CMSIS import with Zephyr 3.4+ (#2744) Fixes the import path for CMSIS in Zephyr versions > 3.4. See https://github.com/zephyrproject-rtos/zephyr/pull/59855 for more information. Signed-off-by: Daniel Mangum --- core/shared/platform/zephyr/platform_internal.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/shared/platform/zephyr/platform_internal.h b/core/shared/platform/zephyr/platform_internal.h index d2a94e4ad..71e2d8f0f 100644 --- a/core/shared/platform/zephyr/platform_internal.h +++ b/core/shared/platform/zephyr/platform_internal.h @@ -42,21 +42,23 @@ #include #include #include - -#ifdef CONFIG_ARM_MPU -#include -#endif #else /* else of KERNEL_VERSION_NUMBER < 0x030200 */ #include #include #include #include #include +#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */ #ifdef CONFIG_ARM_MPU +#if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */ +#include +#elif KERNEL_VERSION_NUMBER < 0x030400 /* version 3.4.0 */ #include +#else /* > 3.4.0 */ +#include +#endif #endif -#endif /* end of KERNEL_VERSION_NUMBER < 0x030200 */ #ifndef BH_PLATFORM_ZEPHYR #define BH_PLATFORM_ZEPHYR