summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Chamberlain <ian.h.chamberlain@gmail.com>2022-02-12 20:43:17 -0500
committerMark Drobnak <mark.drobnak@gmail.com>2022-03-06 12:17:40 -0800
commit4646be7a6bdc39fbf404ad3f1eb290f41237f60a (patch)
tree4b703346b19f0323a993842326ead6bf10234e8c
parente99e36e8d177d47af57f10ccdbeacd99aa0ffd16 (diff)
downloadrust-libc-4646be7a6bdc39fbf404ad3f1eb290f41237f60a.tar.gz
Fix uid_t and gid_t sizes on horizon
(cherry picked from commit e84dbb7cb3a015c9f33db9b29019975c669113de)
-rw-r--r--src/unix/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 5ff2294e79..52508345c5 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -23,13 +23,21 @@ pub type uintptr_t = usize;
pub type ssize_t = isize;
pub type pid_t = i32;
-pub type uid_t = u32;
-pub type gid_t = u32;
pub type in_addr_t = u32;
pub type in_port_t = u16;
pub type sighandler_t = ::size_t;
pub type cc_t = ::c_uchar;
+cfg_if! {
+ if #[cfg(target_os = "horizon")] {
+ pub type uid_t = ::c_ushort;
+ pub type gid_t = ::c_ushort;
+ } else {
+ pub type uid_t = u32;
+ pub type gid_t = u32;
+ }
+}
+
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum DIR {}
impl ::Copy for DIR {}