Skip to content

Commit d7b189a

Browse files
committed
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 <[email protected]>
1 parent 49377e8 commit d7b189a

File tree

6 files changed

+23
-1
lines changed

6 files changed

+23
-1
lines changed

app/prj.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ CONFIG_SCHED_CPU_MASK_PIN_ONLY=y
5656
CONFIG_SYS_CLOCK_TICKS_PER_SEC=15000
5757
CONFIG_DAI=y
5858
CONFIG_HEAP_MEM_POOL_SIZE=2048
59+
60+
# To be able to use Zephyr legacy include paths
61+
CONFIG_COMPAT_INCLUDES=y

src/init/init.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
#include <zephyr/logging/log_ctrl.h>
3939
#include <user/abi_dbg.h>
4040
#include <sof_versions.h>
41+
#ifdef CONFIG_COMPAT_INCLUDES
4142
#include <version.h>
43+
#else
44+
#include <zephyr/version.h>
45+
#endif
4246
#endif
4347
#include <sof/lib/ams.h>
4448

src/trace/dma-trace.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
#include <sof_versions.h>
3030

3131
#ifdef __ZEPHYR__
32+
#ifdef CONFIG_COMPAT_INCLUDES
3233
#include <version.h>
34+
#else
35+
#include <zephyr/version.h>
36+
#endif
3337
#endif
3438

3539
#include <errno.h>

zephyr/lib/alloc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
#include <zephyr/init.h>
2424
#include <zephyr/kernel.h>
2525
#include <zephyr/pm/policy.h>
26+
#ifdef CONFIG_COMPAT_INCLUDES
2627
#include <version.h>
28+
#else
29+
#include <zephyr/version.h>
30+
#endif
2731
#include <zephyr/sys/__assert.h>
2832
#include <zephyr/cache.h>
2933

zephyr/lib/cpu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
#include <rtos/alloc.h>
1818

1919
/* Zephyr includes */
20+
#ifdef CONFIG_COMPAT_INCLUDES
2021
#include <version.h>
21-
#include <zephyr/kernel.h>
22+
#else
23+
#include <zephyr/version.h>
24+
#endif
2225
#include <zephyr/device.h>
2326
#include <zephyr/drivers/mm/mm_drv_intel_adsp_mtl_tlb.h>
2427

zephyr/wrapper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
#include <zephyr/kernel_structs.h>
3030
#include <zephyr/kernel.h>
3131
#include <zephyr/pm/policy.h>
32+
#ifdef CONFIG_COMPAT_INCLUDES
3233
#include <version.h>
34+
#else
35+
#include <zephyr/version.h>
36+
#endif
3337
#include <zephyr/sys/__assert.h>
3438
#include <zephyr/logging/log_ctrl.h>
3539
#include <zephyr/logging/log.h>

0 commit comments

Comments
 (0)