authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2020-10-29 21:37:45+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2020-10-29 21:37:45+07:00
log5125eb77bdf7b87ebf65957f540d82879eb94238
treefadb45bb258d34ac560943e5591428c2382ce78c
parent3a58b2330c7164852b2b201b1c20ead5328269a1

Use the *_stat type as self


1 files changed, 6 insertions(+), 6 deletions(-)

lib/std/os/bits/linux/sparc64.zig+6-6
...@@ -509,15 +509,15 @@ pub const libc_stat = extern struct {...@@ -509,15 +509,15 @@ pub const libc_stat = extern struct {
509 ctim: timespec,509 ctim: timespec,
510 __unused: [2]isize,510 __unused: [2]isize,
511511
512 pub fn atime(self: Stat) timespec {512 pub fn atime(self: libc_stat) timespec {
513 return self.atim;513 return self.atim;
514 }514 }
515515
516 pub fn mtime(self: Stat) timespec {516 pub fn mtime(self: libc_stat) timespec {
517 return self.mtim;517 return self.mtim;
518 }518 }
519519
520 pub fn ctime(self: Stat) timespec {520 pub fn ctime(self: libc_stat) timespec {
521 return self.ctim;521 return self.ctim;
522 }522 }
523};523};
...@@ -545,15 +545,15 @@ pub const kernel_stat = extern struct {...@@ -545,15 +545,15 @@ pub const kernel_stat = extern struct {
545 // Hack to make the stdlib not complain about atime545 // Hack to make the stdlib not complain about atime
546 // and friends not being a method.546 // and friends not being a method.
547 // TODO what should tv_nsec be filled with?547 // TODO what should tv_nsec be filled with?
548 pub fn atime(self: Stat) timespec {548 pub fn atime(self: kernel_stat) timespec {
549 return timespec{.tv_sec=self.atim, .tv_nsec=0};549 return timespec{.tv_sec=self.atim, .tv_nsec=0};
550 }550 }
551551
552 pub fn mtime(self: Stat) timespec {552 pub fn mtime(self: kernel_stat) timespec {
553 return timespec{.tv_sec=self.mtim, .tv_nsec=0};553 return timespec{.tv_sec=self.mtim, .tv_nsec=0};
554 }554 }
555555
556 pub fn ctime(self: Stat) timespec {556 pub fn ctime(self: kernel_stat) timespec {
557 return timespec{.tv_sec=self.ctim, .tv_nsec=0};557 return timespec{.tv_sec=self.ctim, .tv_nsec=0};
558 }558 }
559};559};