diff --git a/src/stdio/src/internal.rs b/src/stdio/src/internal.rs index 00b6892404deb3ea8cecc179f1c672dfd8bbaa77..f9ef756f64eb67d796c46c1fa203818cd0716eee 100644 --- a/src/stdio/src/internal.rs +++ b/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 } +}