Skip to content

Commit

Permalink
Fix the type of _RawOpcode on uclibc.
Browse files Browse the repository at this point in the history
Apply a patch from @spritetong to fix the type of `_RawOpcode` on uclibc.

Fixes #827.
  • Loading branch information
sunfishcode committed Sep 14, 2023
1 parent 93c9547 commit 3e06175
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ioctl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,12 @@ pub type RawOpcode = _RawOpcode;
#[cfg(linux_raw)]
type _RawOpcode = c::c_uint;

// On libc Linux with GNU libc, this is an unsigned long.
#[cfg(all(not(linux_raw), target_os = "linux", target_env = "gnu"))]
// On libc Linux with GNU libc or uclibc, this is an unsigned long.
#[cfg(all(not(linux_raw), target_os = "linux", any(target_env = "gnu", target_env = "uclibc")))]
type _RawOpcode = c::c_ulong;

// Musl uses a c_int
#[cfg(all(not(linux_raw), target_os = "linux", not(target_env = "gnu")))]
#[cfg(all(not(linux_raw), target_os = "linux", not(target_env = "gnu"), not(target_env = "uclibc")))]
type _RawOpcode = c::c_int;

// Android uses c_int
Expand Down

0 comments on commit 3e06175

Please sign in to comment.