commit 0a21c166ae1417767d649dfa3ddb8e9856806c1e
parent d00404b47d1b5302b5f02554eb5cd528ec2309c8
Author: Eyal Sawady <ecs@d2evs.net>
Date: Sat, 12 Mar 2022 08:28:19 +0000
rt+freebsd: fix compilation
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/rt/+freebsd/syscalls.ha b/rt/+freebsd/syscalls.ha
@@ -16,7 +16,7 @@ export fn dup2(old: int, new: int) int =
export fn getpid() int = syscall0(SYS_getpid): int;
-export @noreturn fn exit(status: int) void = syscall1(SYS_exit, status: u64);
+export @noreturn fn exit(status: int) void = { syscall1(SYS_exit, status: u64); };
export fn fork() int = syscall0(SYS_fork): int;
@@ -29,9 +29,10 @@ export fn execve(
argv: uintptr: u64,
envp: uintptr: u64): int;
-export fn wait4(pid: int, status: *int, options: int, rusage: nullable *void) void =
+export fn wait4(pid: int, status: *int, options: int, rusage: nullable *void) void = {
syscall4(SYS_wait4, pid: u64, status: uintptr: u64,
options: u64, rusage: uintptr: u64);
+};
export fn wifexited(status: int) bool = wtermsig(status) == 0;
export fn wexitstatus(status: int) int = (status & 0xff00) >> 8;