parent
4e2a4e194b
commit
e374ae3598
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue