Skip to content

Commit 90b3283

Browse files
authored
Merge pull request #2 from ian-h-chamberlain/time_t-incorrect-type
2 parents 2de3544 + 3102a9e commit 90b3283

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/unix/newlib/mod.rs

Lines changed: 8 additions & 1 deletion
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)