| ... | @@ -47,6 +47,17 @@ pub fn anyReadable(self: File) nio.AnyReadable { | ... | @@ -47,6 +47,17 @@ pub fn anyReadable(self: File) nio.AnyReadable { |
| 47 | pub fn stat(self: File) !Stat { | 47 | pub fn stat(self: File) !Stat { |
| 48 | if (os != .linux) @compileError("TODO: File.stat"); | 48 | if (os != .linux) @compileError("TODO: File.stat"); |
| 49 | const st = try sys_linux.fstat(@intFromEnum(self.fd)); | 49 | const st = try sys_linux.fstat(@intFromEnum(self.fd)); |
| | 50 | if (builtin.target.cpu.arch.isMIPS64()) { |
| | 51 | return .{ |
| | 52 | .inode = st.ino, |
| | 53 | .size = @bitCast(st.size), |
| | 54 | .mode = st.mode, |
| | 55 | .kind = {}, |
| | 56 | .atime = @as(i128, st.atim) * time.ns_per_s + st.atim_nsec, |
| | 57 | .mtime = @as(i128, st.mtim) * time.ns_per_s + st.mtim_nsec, |
| | 58 | .ctime = @as(i128, st.ctim) * time.ns_per_s + st.ctim_nsec, |
| | 59 | }; |
| | 60 | } |
| 50 | return .{ | 61 | return .{ |
| 51 | .inode = st.ino, | 62 | .inode = st.ino, |
| 52 | .size = @bitCast(st.size), | 63 | .size = @bitCast(st.size), |