From 5dad660fd4b53918214dc741bf0c2e2b20b655db Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Tue, 30 Jan 2018 19:52:49 -0800 Subject: Correct the third argument to ioctl on appropriate platforms. While usually `ioctl()` passes a pointer, the function call has been overloaded to allow integers to be passed. For some platforms this is an `int` and on others it's a `ulong`. Fixes #824. --- src/sys/ioctl/linux.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sys/ioctl/linux.rs') diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs index e0d02ad4..17c8cff9 100644 --- a/src/sys/ioctl/linux.rs +++ b/src/sys/ioctl/linux.rs @@ -5,6 +5,9 @@ pub type ioctl_num_type = ::libc::c_int; #[cfg(not(any(target_os = "android", target_env = "musl")))] #[doc(hidden)] pub type ioctl_num_type = ::libc::c_ulong; +/// The datatype used for the 3rd argument +#[doc(hidden)] +pub type ioctl_param_type = ::libc::c_ulong; #[doc(hidden)] pub const NRBITS: ioctl_num_type = 8; -- cgit v1.2.3