From 7c40f732d616a7a2bd005c51ca86d609c2dc4788 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 15 May 2025 00:29:37 -0400 Subject: kernel: syscall: Check for _OLIBC or _KERNEL Signed-off-by: Ian Moffett --- lib/libc/Makefile | 2 +- sys/include/sys/syscall.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 #include +#if defined(_KERNEL) || defined(_OLIBC) #include +#endif /* _KERNEL || _OLIBC */ #endif #define SYS_none 0 -- cgit v1.2.3