Skip to content

Commit 2527c82

Browse files
committed
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.
1 parent 46d03c5 commit 2527c82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/os/linux.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ pub fn access(path: [*:0]const u8, mode: u32) usize {
11491149
}
11501150

11511151
pub fn faccessat(dirfd: i32, path: [*:0]const u8, mode: u32, flags: u32) usize {
1152-
return syscall4(.faccessat, @as(usize, @bitCast(@as(isize, dirfd))), @intFromPtr(path), mode, flags);
1152+
return syscall4(.faccessat2, @as(usize, @bitCast(@as(isize, dirfd))), @intFromPtr(path), mode, flags);
11531153
}
11541154

11551155
pub fn pipe(fd: *[2]i32) usize {

0 commit comments

Comments
 (0)