diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-11-08 16:34:44 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-11-20 08:38:10 +0100 |
| commit | e374ae3598669bf856df9d65e405c398b893e325 (patch) | |
| tree | 61589544b4d336a09d3edc19b1d198b4ef6c34b7 /lib | |
| parent | 4e2a4e194bb07d08927410012a5a19bbe443c9f2 (diff) | |
| download | zig-e374ae3598669bf856df9d65e405c398b893e325.tar.gz zig-e374ae3598669bf856df9d65e405c398b893e325.zip | |
std: Use newfstatat on PPC64
One more variation in the syscall table, hooray!
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/os/linux.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index d0bc80c645..5299c995a0 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1098,6 +1098,8 @@ pub fn lstat(pathname: [*:0]const u8, statbuf: *kernel_stat) usize { pub fn fstatat(dirfd: i32, path: [*:0]const u8, stat_buf: *kernel_stat, flags: u32) usize { if (@hasField(SYS, "fstatat64")) { return syscall4(.fstatat64, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); + } else if (@hasField(SYS, "newfstatat")) { + return syscall4(.newfstatat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); } else { return syscall4(.fstatat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); } |
