diff --git a/core/src/fs.rs b/core/src/fs.rs index 40c7d1b7..916f0818 100644 --- a/core/src/fs.rs +++ b/core/src/fs.rs @@ -1,4 +1,4 @@ -use core::cmp; +use core::{cmp, ffi::c_int}; use bitflags::bitflags; @@ -8,7 +8,7 @@ bitflags! { /// Definition of file open flags which can be mixed and matched as appropriate. These definitions /// are reminiscent of the ones defined by POSIX. #[derive(Clone, Copy, Debug, Eq, PartialEq)] - pub struct FileOpenFlags: i32 { + pub struct FileOpenFlags: c_int { /// Open file in read only mode. const READ = 0x1; /// Open file in write only mode. diff --git a/core/src/io.rs b/core/src/io.rs index bea652af..835887f4 100644 --- a/core/src/io.rs +++ b/core/src/io.rs @@ -74,7 +74,7 @@ impl SeekFrom { } } - pub fn whence(self) -> i32 { + pub fn whence(self) -> c_int { match self { SeekFrom::Start(_) => 0, SeekFrom::End(_) => 2,