libcore: Fix linux/windows bustage. rs=fire
This commit is contained in:
parent
a0c2a9b743
commit
b71381dcc9
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user