diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig index f4ca9cd6dd..3f5b8b340a 100644 --- a/lib/std/c/darwin.zig +++ b/lib/std/c/darwin.zig @@ -372,14 +372,10 @@ pub const Stat = extern struct { uid: uid_t, gid: gid_t, rdev: i32, - atimesec: isize, - atimensec: isize, - mtimesec: isize, - mtimensec: isize, - ctimesec: isize, - ctimensec: isize, - birthtimesec: isize, - birthtimensec: isize, + atimespec: timespec, + mtimespec: timespec, + ctimespec: timespec, + birthtimespec: timespec, size: off_t, blocks: i64, blksize: i32, @@ -389,24 +385,15 @@ pub const Stat = extern struct { qspare: [2]i64, pub fn atime(self: @This()) timespec { - return timespec{ - .tv_sec = self.atimesec, - .tv_nsec = self.atimensec, - }; + return self.atimespec; } pub fn mtime(self: @This()) timespec { - return timespec{ - .tv_sec = self.mtimesec, - .tv_nsec = self.mtimensec, - }; + return self.mtimespec; } pub fn ctime(self: @This()) timespec { - return timespec{ - .tv_sec = self.ctimesec, - .tv_nsec = self.ctimensec, - }; + return self.ctimespec; } };