From 3e06175e8d95e50fa28445b5fc259791ea389ff8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 14 Sep 2023 12:49:24 -0700 Subject: [PATCH] Fix the type of `_RawOpcode` on uclibc. Apply a patch from @spritetong to fix the type of `_RawOpcode` on uclibc. Fixes #827. --- src/ioctl/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ioctl/mod.rs b/src/ioctl/mod.rs index 61a08b8e1..e870b7eb6 100644 --- a/src/ioctl/mod.rs +++ b/src/ioctl/mod.rs @@ -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