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,17 +316,21 @@ pub fn fdopen(fd: c_int) -> *FILE {
#[cfg(windows)]
pub fn fsync_fd(fd: c_int, _level: io::fsync::Level) -> c_int {
use libc::funcs::extra::msvcrt::*;
return commit(fd);
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 {
use libc::funcs::posix01::unistd::*;
match level {
io::fsync::FSync
| io::fsync::FullFSync => return fsync(fd),
io::fsync::FDataSync => return fdatasync(fd)
unsafe {
use libc::funcs::posix01::unistd::*;
match level {
io::fsync::FSync
| io::fsync::FullFSync => return fsync(fd),
io::fsync::FDataSync => return fdatasync(fd)
}
}
}