Commit 336d81894d

Jeff Fowler <jeffowler@gmail.com>
2017-11-09 19:46:53
Fix Stat include in darwin land (#605)
1 parent 52521d5
Changed files (2)
std/c/index.zig
@@ -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;
std/os/darwin.zig
@@ -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))
 }
 
@@ -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 {