From c74f38d63ae3569332c5cb1ec184a405feba3cb2 Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Wed, 8 Nov 2023 18:05:43 +0800 Subject: [PATCH] zephyr: namespace the generated `version.h` Zephyr's build time generated `version.h` is now in the `zephyr` to provide proper namespace, update the includes of this module accordingly. Signed-off-by: Yong Cong Sin --- app/prj.conf | 3 +++ src/init/init.c | 2 +- src/trace/dma-trace.c | 2 +- zephyr/lib/alloc.c | 2 +- zephyr/lib/cpu.c | 6 +++++- zephyr/wrapper.c | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/prj.conf b/app/prj.conf index b3f1016620ea..6f2409e591ea 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -56,3 +56,6 @@ CONFIG_SCHED_CPU_MASK_PIN_ONLY=y CONFIG_SYS_CLOCK_TICKS_PER_SEC=15000 CONFIG_DAI=y CONFIG_HEAP_MEM_POOL_SIZE=2048 + +# To be able to use Zephyr legacy include paths +CONFIG_COMPAT_INCLUDES=y diff --git a/src/init/init.c b/src/init/init.c index cdfa2b6ef794..af854921271d 100644 --- a/src/init/init.c +++ b/src/init/init.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #endif #include diff --git a/src/trace/dma-trace.c b/src/trace/dma-trace.c index 9d4351c8e8d0..f8aa1c2f96ff 100644 --- a/src/trace/dma-trace.c +++ b/src/trace/dma-trace.c @@ -29,7 +29,7 @@ #include #ifdef __ZEPHYR__ -#include +#include #endif #include diff --git a/zephyr/lib/alloc.c b/zephyr/lib/alloc.c index f20e125e9246..4507fd7287ea 100644 --- a/zephyr/lib/alloc.c +++ b/zephyr/lib/alloc.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/zephyr/lib/cpu.c b/zephyr/lib/cpu.c index d630177bdde2..544bbcb4d4f4 100644 --- a/zephyr/lib/cpu.c +++ b/zephyr/lib/cpu.c @@ -17,8 +17,12 @@ #include /* Zephyr includes */ -#include +#include +#ifdef CONFIG_COMPAT_INCLUDES +#include +#else #include +#endif #include #include diff --git a/zephyr/wrapper.c b/zephyr/wrapper.c index 0d4644ffdfb2..d912e3d8aba2 100644 --- a/zephyr/wrapper.c +++ b/zephyr/wrapper.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include