From caf80e90b85a2a7855c369887dce163cf036ff7e Mon Sep 17 00:00:00 2001 From: Pat Tullmann Date: Sat, 19 Jul 2025 20:31:13 -0700 Subject: [PATCH] linux/mips.zig: Use `i32` for stat nsec fields The `atime()`, etc wrappers here expect to create a `std.linux.timespec` (defined in `linux.zig` to have `isize` fields), so the u32 causes errors: error: expected type 'isize', found 'u32' .nsec = self.atim_nsec, Make the nsec fields signed for consistency with all the other structs, with and with `std.linux.timespec`. Also looks like the comment on `__pad1` was copied from `__pad0`, but it only applies to `__pad0`. --- lib/std/os/linux/mips.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/std/os/linux/mips.zig b/lib/std/os/linux/mips.zig index d7225eb7b3..0293fb83e8 100644 --- a/lib/std/os/linux/mips.zig +++ b/lib/std/os/linux/mips.zig @@ -317,14 +317,14 @@ pub const Stat = extern struct { uid: uid_t, gid: gid_t, rdev: dev_t, - __pad1: [2]u32, // -1 because our dev_t is u64 (kernel dev_t is really u32). + __pad1: [2]u32, size: off_t, atim: i32, - atim_nsec: u32, + atim_nsec: i32, mtim: i32, - mtim_nsec: u32, + mtim_nsec: i32, ctim: i32, - ctim_nsec: u32, + ctim_nsec: i32, blksize: blksize_t, __pad3: u32, blocks: blkcnt_t,