diff options
| author | Luna <git@l4.pm> | 2020-04-20 16:34:37 -0300 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-06-02 14:56:19 -0400 |
| commit | c8468bed42db773cc0622c6ea2e18d5e17808f2b (patch) | |
| tree | 83be6e3ed804ab505a3a280bba5941a8a474a61d /lib/std/os/linux.zig | |
| parent | c7b790ded685cb3bcb17fe7a27de7ae054133250 (diff) | |
| download | zig-c8468bed42db773cc0622c6ea2e18d5e17808f2b.tar.gz zig-c8468bed42db773cc0622c6ea2e18d5e17808f2b.zip | |
Add std.os.ioctl
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 f00238141a..db901594f7 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1193,6 +1193,10 @@ pub fn tcsetattr(fd: fd_t, optional_action: TCSA, termios_p: *const termios) usi return syscall3(.ioctl, @bitCast(usize, @as(isize, fd)), TCSETS + @enumToInt(optional_action), @ptrToInt(termios_p)); } +pub fn ioctl(fd: fd_t, request: u32, arg: var) usize { + return syscall3(.ioctl, @bitCast(usize, @as(isize, fd)), request, arg); +} + test "" { if (builtin.os.tag == .linux) { _ = @import("linux/test.zig"); |
