Skip to content

Commit d3ae806

Browse files
authored
Fix the type of _RawOpcode on uclibc. (#828)
Apply a patch from @spritetong to fix the type of `_RawOpcode` on uclibc. Fixes #827.
1 parent 93c9547 commit d3ae806

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src/ioctl/mod.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,21 @@ pub type RawOpcode = _RawOpcode;
293293
#[cfg(linux_raw)]
294294
type _RawOpcode = c::c_uint;
295295

296-
// On libc Linux with GNU libc, this is an unsigned long.
297-
#[cfg(all(not(linux_raw), target_os = "linux", target_env = "gnu"))]
296+
// On libc Linux with GNU libc or uclibc, this is an unsigned long.
297+
#[cfg(all(
298+
not(linux_raw),
299+
target_os = "linux",
300+
any(target_env = "gnu", target_env = "uclibc")
301+
))]
298302
type _RawOpcode = c::c_ulong;
299303

300304
// Musl uses a c_int
301-
#[cfg(all(not(linux_raw), target_os = "linux", not(target_env = "gnu")))]
305+
#[cfg(all(
306+
not(linux_raw),
307+
target_os = "linux",
308+
not(target_env = "gnu"),
309+
not(target_env = "uclibc")
310+
))]
302311
type _RawOpcode = c::c_int;
303312

304313
// Android uses c_int

0 commit comments

Comments
 (0)