Skip to content

Commit 98ef7e7

Browse files
ian-h-chamberlainMeziu
authored andcommitted
Use c_longlong for time_t on horizon
1 parent cef3b81 commit 98ef7e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/unix/newlib/mod.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,16 @@ pub type socklen_t = u32;
2828
pub type speed_t = u32;
2929
pub type suseconds_t = i32;
3030
pub type tcflag_t = ::c_uint;
31-
pub type time_t = i32;
3231
pub type useconds_t = u32;
3332

33+
cfg_if! {
34+
if #[cfg(target_os = "horizon")] {
35+
pub type time_t = ::c_longlong;
36+
} else {
37+
pub type time_t = i32;
38+
}
39+
}
40+
3441
s! {
3542
// The order of the `ai_addr` field in this struct is crucial
3643
// for converting between the Rust and C types.

0 commit comments

Comments
 (0)