diff options
| author | Chris Heyes <rumcode@icloud.com> | 2020-05-02 19:14:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-02 14:14:46 -0400 |
| commit | 8ebcca6734e07aea29098ca4c63c0216b3099d0e (patch) | |
| tree | 37f85f4c35f3107da778958ee2cedbe51192b03c /lib/std/os | |
| parent | 33705d06bb7025813422a7104c24370f0a29dd75 (diff) | |
| download | zig-8ebcca6734e07aea29098ca4c63c0216b3099d0e.tar.gz zig-8ebcca6734e07aea29098ca4c63c0216b3099d0e.zip | |
Get evented io code paths to build on macOS (#5233)
* Get evented io code paths to build on macOS
* Use mode_t instead of usize where appropriate
Diffstat (limited to 'lib/std/os')
| -rw-r--r-- | lib/std/os/linux.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 5631a90ef9..15f9bf9b62 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -492,7 +492,7 @@ pub fn renameat2(oldfd: i32, oldpath: [*:0]const u8, newfd: i32, newpath: [*:0]c ); } -pub fn open(path: [*:0]const u8, flags: u32, perm: usize) usize { +pub fn open(path: [*:0]const u8, flags: u32, perm: mode_t) usize { if (@hasField(SYS, "open")) { return syscall3(.open, @ptrToInt(path), flags, perm); } else { @@ -506,11 +506,11 @@ pub fn open(path: [*:0]const u8, flags: u32, perm: usize) usize { } } -pub fn create(path: [*:0]const u8, perm: usize) usize { +pub fn create(path: [*:0]const u8, perm: mode_t) usize { return syscall2(.creat, @ptrToInt(path), perm); } -pub fn openat(dirfd: i32, path: [*:0]const u8, flags: u32, mode: usize) usize { +pub fn openat(dirfd: i32, path: [*:0]const u8, flags: u32, mode: mode_t) usize { // dirfd could be negative, for example AT_FDCWD is -100 return syscall4(.openat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), flags, mode); } |
