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 {
509509 ctim: timespec,
510510 __unused: [2]isize,
511511
512 pub fn atime(self: Stat) timespec {
512 pub fn atime(self: libc_stat) timespec {
513513 return self.atim;
514514 }
515515
516 pub fn mtime(self: Stat) timespec {
516 pub fn mtime(self: libc_stat) timespec {
517517 return self.mtim;
518518 }
519519
520 pub fn ctime(self: Stat) timespec {
520 pub fn ctime(self: libc_stat) timespec {
521521 return self.ctim;
522522 }
523523};
......@@ -545,15 +545,15 @@ pub const kernel_stat = extern struct {
545545 // Hack to make the stdlib not complain about atime
546546 // and friends not being a method.
547547 // TODO what should tv_nsec be filled with?
548 pub fn atime(self: Stat) timespec {
548 pub fn atime(self: kernel_stat) timespec {
549549 return timespec{.tv_sec=self.atim, .tv_nsec=0};
550550 }
551551
552 pub fn mtime(self: Stat) timespec {
552 pub fn mtime(self: kernel_stat) timespec {
553553 return timespec{.tv_sec=self.mtim, .tv_nsec=0};
554554 }
555555
556 pub fn ctime(self: Stat) timespec {
556 pub fn ctime(self: kernel_stat) timespec {
557557 return timespec{.tv_sec=self.ctim, .tv_nsec=0};
558558 }
559559};