Fix Stat include in darwin land (#605)

This commit is contained in:
Jeff Fowler 2017-11-09 19:46:53 +01:00 committed by Andrew Kelley
parent 52521d5f67
commit 336d81894d
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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 {