Skip to content

Commit e84dbb7

Browse files
Fix uid_t and gid_t sizes on horizon
1 parent 0c2a86d commit e84dbb7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/unix/mod.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,21 @@ pub type uintptr_t = usize;
2323
pub type ssize_t = isize;
2424

2525
pub type pid_t = i32;
26-
pub type uid_t = u32;
27-
pub type gid_t = u32;
2826
pub type in_addr_t = u32;
2927
pub type in_port_t = u16;
3028
pub type sighandler_t = ::size_t;
3129
pub type cc_t = ::c_uchar;
3230

31+
cfg_if! {
32+
if #[cfg(target_os = "horizon")] {
33+
pub type uid_t = ::c_ushort;
34+
pub type gid_t = ::c_ushort;
35+
} else {
36+
pub type uid_t = u32;
37+
pub type gid_t = u32;
38+
}
39+
}
40+
3341
#[cfg_attr(feature = "extra_traits", derive(Debug))]
3442
pub enum DIR {}
3543
impl ::Copy for DIR {}

0 commit comments

Comments
 (0)