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 <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2023-11-21 12:56:12 -08:00 committed by Carles Cufí
parent b43271dc2d
commit 062fc2242a

View file

@ -517,6 +517,8 @@ static inline unsigned int arch_num_cpus(void);
*/
#ifdef CONFIG_USERSPACE
#include <zephyr/arch/syscall.h>
/**
* Invoke a system call with 0 arguments.
*