| author | |
| committer | |
| log | 54229fec337f61cad2243f416966892136285683 |
| tree | e308f42a9d13907ae268d1690cff6431b3bd7cdc |
| parent | 264969a8c3f84212a71fc43f9239b0dc7684994c |
2 files changed, 3 insertions(+), 3 deletions(-)
lib/std/c.zig+1-1| ... | ... | @@ -103,7 +103,7 @@ pub extern "c" fn linkat(oldfd: fd_t, oldpath: [*:0]const u8, newfd: fd_t, newpa |
| 103 | 103 | pub extern "c" fn unlink(path: [*:0]const u8) c_int; |
| 104 | 104 | pub extern "c" fn unlinkat(dirfd: fd_t, path: [*:0]const u8, flags: c_uint) c_int; |
| 105 | 105 | pub extern "c" fn getcwd(buf: [*]u8, size: usize) ?[*]u8; |
| 106 | pub extern "c" fn waitpid(pid: c_int, stat_loc: *c_uint, options: c_uint) c_int; | |
| 106 | pub extern "c" fn waitpid(pid: pid_t, stat_loc: ?*c_int, options: c_int) pid_t; | |
| 107 | 107 | pub extern "c" fn fork() c_int; |
| 108 | 108 | pub extern "c" fn access(path: [*:0]const u8, mode: c_uint) c_int; |
| 109 | 109 | pub extern "c" fn faccessat(dirfd: fd_t, path: [*:0]const u8, mode: c_uint, flags: c_uint) c_int; |
lib/std/os.zig+2-2| ... | ... | @@ -3435,10 +3435,10 @@ pub const WaitPidResult = struct { |
| 3435 | 3435 | }; |
| 3436 | 3436 | |
| 3437 | 3437 | pub fn waitpid(pid: pid_t, flags: u32) WaitPidResult { |
| 3438 | const Status = if (builtin.link_libc) c_uint else u32; | |
| 3438 | const Status = if (builtin.link_libc) c_int else u32; | |
| 3439 | 3439 | var status: Status = undefined; |
| 3440 | 3440 | while (true) { |
| 3441 | const rc = system.waitpid(pid, &status, flags); | |
| 3441 | const rc = system.waitpid(pid, &status, if (builtin.link_libc) @intCast(c_int, flags) else flags); | |
| 3442 | 3442 | switch (errno(rc)) { |
| 3443 | 3443 | 0 => return .{ |
| 3444 | 3444 | .pid = @intCast(pid_t, rc), |