Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizon (Nintendo 3DS) getrandom function and fixes #2714

Merged
merged 7 commits into from
Mar 14, 2022
Prev Previous commit
Next Next commit
Fix uid_t and gid_t sizes on horizon
(cherry picked from commit e84dbb7)
  • Loading branch information
ian-h-chamberlain authored and AzureMarker committed Mar 6, 2022
commit 4646be7a6bdc39fbf404ad3f1eb290f41237f60a
12 changes: 10 additions & 2 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down