diff options
author | Ian Moffett <ian@osmora.org> | 2025-05-15 00:29:37 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-05-15 00:29:37 -0400 |
commit | 7c40f732d616a7a2bd005c51ca86d609c2dc4788 (patch) | |
tree | d1c241c93934a5e545bc7a6b8bf7cf9387fc6d8f | |
parent | 9497b090cc1b53cea119b14d8b68d305cc2c73e0 (diff) |
kernel: syscall: Check for _OLIBC or _KERNEL
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | lib/libc/Makefile | 2 | ||||
-rw-r--r-- | sys/include/sys/syscall.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 49e7329..f9a1239 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -c -fno-stack-protector -nostdlib -static -Iinclude/ +CFLAGS = -c -fno-stack-protector -nostdlib -static -Iinclude/ -D_OLIBC LIBC_CFILES = $(shell find src/ -name "*.c") LIBC_ASMFILES = $(shell find src/ -name "*.S") diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index 3f3a8b3..2b98df7 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -33,7 +33,9 @@ #if !defined(__ASSEMBLER__) #include <sys/types.h> #include <sys/cdefs.h> +#if defined(_KERNEL) || defined(_OLIBC) #include <machine/syscall.h> +#endif /* _KERNEL || _OLIBC */ #endif #define SYS_none 0 |