Skip to content

Commit

Permalink
Switch to cfg_if!
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Feb 3, 2024
1 parent edbdec1 commit 78018cb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/unix/linux_like/emscripten/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ pub type clock_t = c_long;
// And it's still int64 today. The change from long to int was marked as a
// nonfunctional change since wasm64 was considered to be not working yet in
// v3.1.11. So it suffices to say it's 32 bit until v3.1.16 and 64 bit after.
#[cfg(emscripten_64_bit_time_t)]
pub type time_t = i64;
#[cfg(not(emscripten_64_bit_time_t))]
pub type time_t = i32;
cfg_if! {
if #[cfg(emscripten_64_bit_time_t)] {
pub type time_t = i64;
} else {
pub type time_t = i32;
}
}

pub type suseconds_t = c_long;
pub type ino_t = u64;
Expand Down

0 comments on commit 78018cb

Please sign in to comment.