From 062fc2242acb39f21aae9ae4a5a8251b780d43f0 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Tue, 21 Nov 2023 12:56:12 -0800 Subject: [PATCH] sys: arch_interface: include arch/syscall.h if USERSPACE Due to arch_syscall_invoke are declared static, if there are no corresponding definition, compiler will complain. It has been working fine so far because arch/syscall.h is included indirectly through some other headers (especially through generated syscall stubs). However, with enough header files shuffling this becomes an issue. So include arch/syscall.h in arch_interface.h explicitly. Signed-off-by: Daniel Leung --- include/zephyr/sys/arch_interface.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/zephyr/sys/arch_interface.h b/include/zephyr/sys/arch_interface.h index e694bce55c..1e5eaad87b 100644 --- a/include/zephyr/sys/arch_interface.h +++ b/include/zephyr/sys/arch_interface.h @@ -517,6 +517,8 @@ static inline unsigned int arch_num_cpus(void); */ #ifdef CONFIG_USERSPACE +#include + /** * Invoke a system call with 0 arguments. *