libcore: Fix linux/windows bustage. rs=fire

This commit is contained in:
Patrick Walton 2013-01-10 21:49:31 -08:00
parent a0c2a9b743
commit b71381dcc9

View file

@ -316,18 +316,22 @@ pub fn fdopen(fd: c_int) -> *FILE {
#[cfg(windows)]
pub fn fsync_fd(fd: c_int, _level: io::fsync::Level) -> c_int {
unsafe {
use libc::funcs::extra::msvcrt::*;
return commit(fd);
}
}
#[cfg(target_os = "linux")]
pub fn fsync_fd(fd: c_int, level: io::fsync::Level) -> c_int {
unsafe {
use libc::funcs::posix01::unistd::*;
match level {
io::fsync::FSync
| io::fsync::FullFSync => return fsync(fd),
io::fsync::FDataSync => return fdatasync(fd)
}
}
}
#[cfg(target_os = "macos")]