Skip to content

Commit

Permalink
Fix Stat include in darwin land (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfo authored and andrewrk committed Nov 9, 2017
1 parent 52521d5 commit 336d818
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion std/c/index.zig
Expand Up @@ -13,7 +13,7 @@ pub extern "c" fn abort() -> noreturn;
pub extern "c" fn exit(code: c_int) -> noreturn;
pub extern "c" fn isatty(fd: c_int) -> c_int;
pub extern "c" fn close(fd: c_int) -> c_int;
pub extern "c" fn fstat(fd: c_int, buf: &stat) -> c_int;
pub extern "c" fn fstat(fd: c_int, buf: &Stat) -> c_int;
pub extern "c" fn lseek(fd: c_int, offset: isize, whence: c_int) -> isize;
pub extern "c" fn open(path: &const u8, oflag: c_int, ...) -> c_int;
pub extern "c" fn raise(sig: c_int) -> c_int;
Expand Down
3 changes: 2 additions & 1 deletion std/os/darwin.zig
Expand Up @@ -128,7 +128,7 @@ pub fn isatty(fd: i32) -> bool {
c.isatty(fd) != 0
}

pub fn fstat(fd: i32, buf: &c.stat) -> usize {
pub fn fstat(fd: i32, buf: &c.Stat) -> usize {
errnoWrap(c.fstat(fd, buf))
}

Expand Down Expand Up @@ -268,6 +268,7 @@ pub const sigset_t = c.sigset_t;
pub const empty_sigset = sigset_t(0);

pub const timespec = c.timespec;
pub const Stat = c.Stat;

/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.
pub const Sigaction = struct {
Expand Down

0 comments on commit 336d818

Please sign in to comment.