diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-03-16 11:39:18 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-18 13:45:52 -0400 |
| commit | 4843c3b4c386008418ff8ab7238feebab3711352 (patch) | |
| tree | 9d6ae6578a92bde27f718a6597a9872b486f2ead /lib/std/os/linux.zig | |
| parent | b1537b525fa0cd8d51ff89519254db0f066fc04b (diff) | |
| download | zig-4843c3b4c386008418ff8ab7238feebab3711352.tar.gz zig-4843c3b4c386008418ff8ab7238feebab3711352.zip | |
std: Introduce fnctl wrapper
Diffstat (limited to 'lib/std/os/linux.zig')
| -rw-r--r-- | lib/std/os/linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index f3265eaa61..ae48d831cf 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -588,6 +588,10 @@ pub fn waitpid(pid: pid_t, status: *u32, flags: u32) usize { return syscall4(SYS_wait4, @bitCast(usize, @as(isize, pid)), @ptrToInt(status), flags, 0); } +pub fn fcntl(fd: fd_t, cmd: i32, arg: usize) usize { + return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), arg); +} + var vdso_clock_gettime = @ptrCast(?*const c_void, init_vdso_clock_gettime); // We must follow the C calling convention when we call into the VDSO |
