summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2013-09-28 15:20:54 -0500
committerDavid Barksdale <amatus@amatus.name>2013-09-28 15:20:54 -0500
commit27cf80b860b7efb53480731e921307457a982e7f (patch)
tree678c774a44d52c4a90eb0d21ab45560ce1a11c44
parent91f8e289c7ed3df1339848f2de9f07d33b35902a (diff)
Use correct type for read()'s 3rd argument.
-rw-r--r--oss.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/oss.rs b/oss.rs
index b870c45..edfad37 100644
--- a/oss.rs
+++ b/oss.rs
@@ -1,4 +1,4 @@
-use std::libc::{c_int, c_void, close, O_RDONLY, open, read};
+use std::libc::{c_int, c_void, close, O_RDONLY, open, read, size_t};
use std::rt::io::{io_error, IoError, OtherIoError};
use std::vec;
@@ -120,7 +120,7 @@ impl OssDevice {
unsafe {
let length = read(self.fd,
vec::raw::to_mut_ptr(buffer) as *mut c_void,
- block_size as u32);
+ block_size as size_t);
if length == -1 {
break;
}