From 27cf80b860b7efb53480731e921307457a982e7f Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Sat, 28 Sep 2013 15:20:54 -0500 Subject: Use correct type for read()'s 3rd argument. --- oss.rs | 4 ++-- 1 file 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; } -- cgit v1.2.3-18-g5258