summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Chamberlain <ian.h.chamberlain@gmail.com>2022-01-19 22:16:42 -0500
committerAndrea Ciliberti <meziu210@icloud.com>2022-01-23 00:45:33 +0100
commit98ef7e73e32139fb5cf47df40421b5dc88c9434f (patch)
tree47e628619985ac5d74e4bd1b929cd2c161346cd6
parentcef3b81128c262b68f983e91621002c294108e85 (diff)
downloadrust-libc-98ef7e73e32139fb5cf47df40421b5dc88c9434f.tar.gz
Use c_longlong for time_t on horizon
-rw-r--r--src/unix/newlib/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs
index b1300f1692..f1d738cb05 100644
--- a/src/unix/newlib/mod.rs
+++ b/src/unix/newlib/mod.rs
@@ -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.