From a192467067420ee7a1b549eab9e211f1f7c66608 Mon Sep 17 00:00:00 2001 From: Krisztian <34309983+kr-t@users.noreply.github.com> Date: Mon, 24 Nov 2025 12:20:53 +0100 Subject: [PATCH] Namespace generated headers with zephyr/ (#4670) * Namespace generated headers with zephyr/ --------- Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com> --- core/shared/platform/zephyr/platform_internal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/shared/platform/zephyr/platform_internal.h b/core/shared/platform/zephyr/platform_internal.h index 134b5c2b5..08c0b4777 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 +/* + * 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