authorgravatar for jeffowler@gmail.comJeff Fowler <jeffowler@gmail.com> 2017-11-09 19:46:53+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-11-09 13:46:53-05:00
log336d81894da2c34a77cffd1bf903ad9e4dcaa7aa
tree996622298937b485ce9fc9aacbb7b86772b5f85c
parent52521d5f67a2ff1290856e832f3f2a2a2245f41a

Fix Stat include in darwin land (#605)


2 files changed, 3 insertions(+), 2 deletions(-)

std/c/index.zig+1-1
...@@ -13,7 +13,7 @@ pub extern "c" fn abort() -> noreturn;...@@ -13,7 +13,7 @@ pub extern "c" fn abort() -> noreturn;
13pub extern "c" fn exit(code: c_int) -> noreturn;13pub extern "c" fn exit(code: c_int) -> noreturn;
14pub extern "c" fn isatty(fd: c_int) -> c_int;14pub extern "c" fn isatty(fd: c_int) -> c_int;
15pub extern "c" fn close(fd: c_int) -> c_int;15pub extern "c" fn close(fd: c_int) -> c_int;
16pub extern "c" fn fstat(fd: c_int, buf: &stat) -> c_int;16pub extern "c" fn fstat(fd: c_int, buf: &Stat) -> c_int;
17pub extern "c" fn lseek(fd: c_int, offset: isize, whence: c_int) -> isize;17pub extern "c" fn lseek(fd: c_int, offset: isize, whence: c_int) -> isize;
18pub extern "c" fn open(path: &const u8, oflag: c_int, ...) -> c_int;18pub extern "c" fn open(path: &const u8, oflag: c_int, ...) -> c_int;
19pub extern "c" fn raise(sig: c_int) -> c_int;19pub extern "c" fn raise(sig: c_int) -> c_int;
std/os/darwin.zig+2-1
...@@ -128,7 +128,7 @@ pub fn isatty(fd: i32) -> bool {...@@ -128,7 +128,7 @@ pub fn isatty(fd: i32) -> bool {
128 c.isatty(fd) != 0128 c.isatty(fd) != 0
129}129}
130130
131pub fn fstat(fd: i32, buf: &c.stat) -> usize {131pub fn fstat(fd: i32, buf: &c.Stat) -> usize {
132 errnoWrap(c.fstat(fd, buf))132 errnoWrap(c.fstat(fd, buf))
133}133}
134134
...@@ -268,6 +268,7 @@ pub const sigset_t = c.sigset_t;...@@ -268,6 +268,7 @@ pub const sigset_t = c.sigset_t;
268pub const empty_sigset = sigset_t(0);268pub const empty_sigset = sigset_t(0);
269269
270pub const timespec = c.timespec;270pub const timespec = c.timespec;
271pub const Stat = c.Stat;
271272
272/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.273/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.
273pub const Sigaction = struct {274pub const Sigaction = struct {