diff --git a/include/toolchain/common.h b/include/toolchain/common.h index 251ff701233..9d18a5ba658 100644 --- a/include/toolchain/common.h +++ b/include/toolchain/common.h @@ -108,8 +108,18 @@ /* Additionally used as a sentinel by gen_syscalls.py to identify what * functions are system calls + * + * Note POSIX unit tests don't still generate the system call stubs, so + * until https://github.com/zephyrproject-rtos/zephyr/issues/5006 is + * fixed via possibly #4174, we introduce this hack -- which will + * disallow us to test system calls in POSIX unit testing (currently + * not used). */ +#ifndef ZTEST_UNITTEST #define __syscall static inline +#else +#define __syscall +#endif /* #ifndef ZTEST_UNITTEST */ #ifndef BUILD_ASSERT /* compile-time assertion that makes the build fail */