diff options
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/file_unix.rs | 2 | ||||
| -rw-r--r-- | src/libnative/io/net.rs | 2 | ||||
| -rw-r--r-- | src/libnative/io/pipe_unix.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libnative/io/file_unix.rs b/src/libnative/io/file_unix.rs index 3c49e1c40d6..90fbc7729d4 100644 --- a/src/libnative/io/file_unix.rs +++ b/src/libnative/io/file_unix.rs @@ -303,7 +303,7 @@ impl rtio::RtioFileStream for CFile { self.flush().and_then(|()| self.fd.fsync()) } fn datasync(&mut self) -> IoResult<()> { - self.flush().and_then(|()| self.fd.fsync()) + self.flush().and_then(|()| self.fd.datasync()) } fn truncate(&mut self, offset: i64) -> IoResult<()> { self.flush().and_then(|()| self.fd.truncate(offset)) diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs index 8418e741167..335a52b0bbe 100644 --- a/src/libnative/io/net.rs +++ b/src/libnative/io/net.rs @@ -337,7 +337,7 @@ impl rtio::RtioTcpStream for TcpStream { let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::send(fd, - buf as *mut libc::c_void, + buf as *const _, len as wrlen, flags) as i64 }; diff --git a/src/libnative/io/pipe_unix.rs b/src/libnative/io/pipe_unix.rs index c222907fa5b..48f31615339 100644 --- a/src/libnative/io/pipe_unix.rs +++ b/src/libnative/io/pipe_unix.rs @@ -173,7 +173,7 @@ impl rtio::RtioPipe for UnixStream { let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::send(fd, - buf as *mut libc::c_void, + buf as *const _, len as libc::size_t, flags) as i64 }; |
