| ... | ... | @@ -212,8 +212,37 @@ pub const msghdr_const = extern struct { |
| 212 | 212 | flags: i32, |
| 213 | 213 | }; |
| 214 | 214 | |
| 215 | | /// No `Stat` structure on this platform, only `Statx`. |
| 216 | | pub const Stat = void; |
| 215 | // The `stat` definition used by the Linux kernel. |
| 216 | pub const Stat = extern struct { |
| 217 | dev: dev_t, |
| 218 | ino: ino_t, |
| 219 | mode: mode_t, |
| 220 | nlink: nlink_t, |
| 221 | uid: uid_t, |
| 222 | gid: gid_t, |
| 223 | rdev: dev_t, |
| 224 | __pad: usize, |
| 225 | size: off_t, |
| 226 | blksize: blksize_t, |
| 227 | __pad2: i32, |
| 228 | blocks: blkcnt_t, |
| 229 | atim: timespec, |
| 230 | mtim: timespec, |
| 231 | ctim: timespec, |
| 232 | __unused: [2]u32, |
| 233 | |
| 234 | pub fn atime(self: @This()) timespec { |
| 235 | return self.atim; |
| 236 | } |
| 237 | |
| 238 | pub fn mtime(self: @This()) timespec { |
| 239 | return self.mtim; |
| 240 | } |
| 241 | |
| 242 | pub fn ctime(self: @This()) timespec { |
| 243 | return self.ctim; |
| 244 | } |
| 245 | }; |
| 217 | 246 | |
| 218 | 247 | pub const Elf_Symndx = u32; |
| 219 | 248 | |