| ... | ... | @@ -124,7 +124,14 @@ pub extern "c" fn readlinkat(dirfd: fd_t, noalias path: [*:0]const u8, noalias b |
| 124 | 124 | pub usingnamespace switch (builtin.os.tag) { |
| 125 | 125 | .macos, .ios, .watchos, .tvos => struct { |
| 126 | 126 | pub const realpath = @"realpath$DARWIN_EXTSN"; |
| 127 | | pub const fstatat = @"fstatat$INODE64"; |
| 127 | pub usingnamespace switch (builtin.arch) { |
| 128 | .aarch64 => struct { |
| 129 | pub extern "c" fn fstatat(dirfd: fd_t, path: [*:0]const u8, stat_buf: *Stat, flags: u32) c_int; |
| 130 | }, |
| 131 | else => struct { |
| 132 | pub const fstatat = @"fstatat$INODE64"; |
| 133 | }, |
| 134 | }; |
| 128 | 135 | }, |
| 129 | 136 | else => struct { |
| 130 | 137 | pub extern "c" fn realpath(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8; |
| ... | ... | @@ -194,7 +201,14 @@ pub usingnamespace switch (builtin.os.tag) { |
| 194 | 201 | // XXX: getdirentries -> _getdirentries64 |
| 195 | 202 | pub extern "c" fn clock_getres(clk_id: c_int, tp: *timespec) c_int; |
| 196 | 203 | pub extern "c" fn clock_gettime(clk_id: c_int, tp: *timespec) c_int; |
| 197 | | pub const fstat = @"fstat$INODE64"; |
| 204 | pub usingnamespace switch (builtin.arch) { |
| 205 | .aarch64 => struct { |
| 206 | pub extern "c" fn fstat(fd: fd_t, buf: *Stat) c_int; |
| 207 | }, |
| 208 | else => struct { |
| 209 | pub const fstat = @"fstat$INODE64"; |
| 210 | } |
| 211 | }; |
| 198 | 212 | pub extern "c" fn getrusage(who: c_int, usage: *rusage) c_int; |
| 199 | 213 | pub extern "c" fn gettimeofday(noalias tv: ?*timeval, noalias tz: ?*timezone) c_int; |
| 200 | 214 | pub extern "c" fn nanosleep(rqtp: *const timespec, rmtp: ?*timespec) c_int; |