From a8063fd4a438e3374535b66b70cb21c54b12bab7 Mon Sep 17 00:00:00 2001 From: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:14:15 +0200 Subject: [PATCH 1/2] Namespace generated headers with zephyr/ Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com> --- .../platform/zephyr/platform_internal.h | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/core/shared/platform/zephyr/platform_internal.h b/core/shared/platform/zephyr/platform_internal.h index d5f0c80d81..7bad36bb47 100644 --- a/core/shared/platform/zephyr/platform_internal.h +++ b/core/shared/platform/zephyr/platform_internal.h @@ -7,8 +7,24 @@ #ifndef _PLATFORM_INTERNAL_H #define _PLATFORM_INTERNAL_H -#include -#include +/* + * Modern Zephyr uses zephyr/ namespace. + * + * Note: Cannot use KERNEL_VERSION_NUMBER here as it's defined in version.h + * which we're trying to include. Must use feature detection instead. + */ +#ifdef __has_include + #if __has_include() + #include + #include + #else + #include + #include + #endif +#else + #include + #include +#endif #if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */ #include From 6dd478964a04a00b70dfa00f02d325daf1115e60 Mon Sep 17 00:00:00 2001 From: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:29:56 +0200 Subject: [PATCH 2/2] Apply clang changes Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com> --- .../shared/platform/zephyr/platform_internal.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/shared/platform/zephyr/platform_internal.h b/core/shared/platform/zephyr/platform_internal.h index 7bad36bb47..e62bf42228 100644 --- a/core/shared/platform/zephyr/platform_internal.h +++ b/core/shared/platform/zephyr/platform_internal.h @@ -14,16 +14,16 @@ * which we're trying to include. Must use feature detection instead. */ #ifdef __has_include - #if __has_include() - #include - #include - #else - #include - #include - #endif +#if __has_include() +#include +#include #else - #include - #include +#include +#include +#endif +#else +#include +#include #endif #if KERNEL_VERSION_NUMBER < 0x030200 /* version 3.2.0 */