Skip to content

Commit

Permalink
Use c_longlong for time_t on horizon
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-h-chamberlain authored and Meziu committed Jan 22, 2022
1 parent cef3b81 commit 98ef7e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/unix/newlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,16 @@ pub type socklen_t = u32;
pub type speed_t = u32;
pub type suseconds_t = i32;
pub type tcflag_t = ::c_uint;
pub type time_t = i32;
pub type useconds_t = u32;

cfg_if! {
if #[cfg(target_os = "horizon")] {
pub type time_t = ::c_longlong;
} else {
pub type time_t = i32;
}
}

s! {
// The order of the `ai_addr` field in this struct is crucial
// for converting between the Rust and C types.
Expand Down

0 comments on commit 98ef7e7

Please sign in to comment.