mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 00:08:56 +00:00
std.os.linux: Use faccessat2 syscall in faccessat().
Only the former has a flags parameter. It's only available in Linux 5.8+. Closes #16606.
This commit is contained in:
parent
46d03c5afa
commit
2527c82482
@ -1149,7 +1149,7 @@ pub fn access(path: [*:0]const u8, mode: u32) usize {
|
||||
}
|
||||
|
||||
pub fn faccessat(dirfd: i32, path: [*:0]const u8, mode: u32, flags: u32) usize {
|
||||
return syscall4(.faccessat, @as(usize, @bitCast(@as(isize, dirfd))), @intFromPtr(path), mode, flags);
|
||||
return syscall4(.faccessat2, @as(usize, @bitCast(@as(isize, dirfd))), @intFromPtr(path), mode, flags);
|
||||
}
|
||||
|
||||
pub fn pipe(fd: *[2]i32) usize {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user