--- a/zig/lib/std/os/linux.zig +++ b/zig/lib/std/os/linux.zig @@ -953,7 +953,7 @@ } pub fn access(path: [*:0]const u8, mode: u32) usize { - if (@hasField(SYS, "access")) { + if (@hasField(SYS, "access") and (comptime builtin.cpu.arch != .x86_64)) { return syscall2(.access, @intFromPtr(path), mode); } else { return syscall4(.faccessat, @as(usize, @bitCast(@as(isize, AT.FDCWD))), @intFromPtr(path), mode, 0); @@ -967,7 +967,7 @@ pub fn pipe(fd: *[2]i32) usize { if (comptime (native_arch.isMIPS() or native_arch.isSPARC())) { return syscall_pipe(fd); - } else if (@hasField(SYS, "pipe")) { + } else if (@hasField(SYS, "pipe") and (comptime builtin.cpu.arch != .x86_64)) { return syscall1(.pipe, @intFromPtr(fd)); } else { return syscall2(.pipe2, @intFromPtr(fd), 0); @@ -1815,7 +1815,7 @@ } pub fn statx(dirfd: i32, path: [*:0]const u8, flags: u32, mask: u32, statx_buf: *Statx) usize { - if (@hasField(SYS, "statx")) { + if (@hasField(SYS, "statx") and (comptime builtin.cpu.arch != .aarch64) and (comptime builtin.cpu.arch != .arm) and (comptime builtin.cpu.arch != .riscv64) and (comptime builtin.cpu.arch != .x86) and (comptime builtin.cpu.arch != .x86_64)) { return syscall5( .statx, @as(usize, @bitCast(@as(isize, dirfd))),