Added a different internal function for redox

This commit is contained in:
Tom Almeida
2018-03-15 15:57:19 +08:00
parent c4c8b73903
commit 41b96fede3
+6
View File
@@ -142,6 +142,12 @@ pub unsafe fn ftello(stream: *mut FILE) -> off_t {
}
}
#[cfg(target_os = "linux")]
pub fn stdio_seek(stream: *mut FILE, off: off_t, whence: c_int) -> off_t {
unsafe { platform::lseek((*stream).fd, off, whence) }
}
#[cfg(target_os = "redox")]
pub fn stdio_seek(stream: *mut FILE, off: off_t, whence: c_int) -> off_t {
unsafe { platform::lseek((*stream).fd, off as isize, whence as usize) as off_t }
}