Function fstat [src]

Prototype

pub fn fstat(fd: i32, stat_buf: *Stat) usize

Parameters

fd: i32stat_buf: *Stat

Source

pub fn fstat(fd: i32, stat_buf: *Stat) usize { if (native_arch == .riscv32) { // riscv32 has made the interesting decision to not implement some of // the older stat syscalls, including this one. @compileError("No fstat syscall on this architecture."); } else if (@hasField(SYS, "fstat64")) { return syscall2(.fstat64, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(stat_buf)); } else { return syscall2(.fstat, @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(stat_buf)); } }