c/linux: Fix stat struct definition for SPARCv9

The libc interface uses `stat` instead of `stat64` struct.
This fixes, among other things, `zig fmt` accidentally setting the
formatted file's permission to 000.
This commit is contained in:
Koakuma 2022-03-13 16:14:47 +07:00 committed by Andrew Kelley
parent bb859a0be7
commit cb3b1dd6dd

View File

@ -117,14 +117,15 @@ pub const _errno = switch (native_abi) {
pub const Stat = switch (native_arch) {
.sparcv9 => extern struct {
dev: u64,
__pad1: u16,
ino: ino_t,
mode: u32,
nlink: usize,
nlink: u32,
uid: u32,
gid: u32,
rdev: u64,
__pad0: u32,
__pad2: u16,
size: off_t,
blksize: isize,
@ -133,7 +134,7 @@ pub const Stat = switch (native_arch) {
atim: timespec,
mtim: timespec,
ctim: timespec,
__unused: [2]isize,
__reserved: [2]usize,
pub fn atime(self: @This()) timespec {
return self.atim;