Skip to content

Commit

Permalink
redox: long is 32-bits on 32-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Dec 2, 2022
1 parent a90993e commit db3423b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/unix/redox/mod.rs
@@ -1,8 +1,20 @@
pub type c_char = i8;
pub type c_long = i64;
pub type c_ulong = u64;
pub type wchar_t = i32;

cfg_if! {
if #[cfg(target_pointer_width = "32")] {
pub type c_long = i32;
pub type c_ulong = u32;
}
}

cfg_if! {
if #[cfg(target_pointer_width = "64")] {
pub type c_long = i64;
pub type c_ulong = u64;
}
}

pub type blkcnt_t = ::c_ulong;
pub type blksize_t = ::c_long;
pub type clock_t = ::c_long;
Expand Down

0 comments on commit db3423b

Please sign in to comment.