瀏覽代碼

Added a different internal function for redox

Tom Almeida 7 年之前
父節點
當前提交
41b96fede3
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/stdio/src/internal.rs

+ 6 - 0
src/stdio/src/internal.rs

@@ -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 }
+}