aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-11-08 16:34:44 +0100
committerLemonBoy <thatlemon@gmail.com>2020-11-20 08:38:10 +0100
commite374ae3598669bf856df9d65e405c398b893e325 (patch)
tree61589544b4d336a09d3edc19b1d198b4ef6c34b7 /lib/std/os
parent4e2a4e194bb07d08927410012a5a19bbe443c9f2 (diff)
downloadzig-e374ae3598669bf856df9d65e405c398b893e325.tar.gz
zig-e374ae3598669bf856df9d65e405c398b893e325.zip
std: Use newfstatat on PPC64
One more variation in the syscall table, hooray!
Diffstat (limited to 'lib/std/os')
-rw-r--r--lib/std/os/linux.zig2
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);
}