diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs index 314b1c9b6f..067996d6d4 100644 --- a/src/sys/ioctl/linux.rs +++ b/src/sys/ioctl/linux.rs @@ -4,6 +4,7 @@ use cfg_if::cfg_if; #[cfg(any( target_os = "android", target_os = "fuchsia", + target_os = "cygwin", target_env = "musl", target_env = "ohos" ))] @@ -12,12 +13,14 @@ pub type ioctl_num_type = ::libc::c_int; #[cfg(not(any( target_os = "android", target_os = "fuchsia", + target_os = "cygwin", target_env = "musl", target_env = "ohos" )))] #[doc(hidden)] pub type ioctl_num_type = ::libc::c_ulong; /// The datatype used for the 3rd argument +#[cfg(not(target_os = "cygwin"))] #[doc(hidden)] pub type ioctl_param_type = ::libc::c_ulong; diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index aab48192f5..f8bf61652b 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -227,11 +227,21 @@ //! ``` use cfg_if::cfg_if; -#[cfg(any(linux_android, target_os = "fuchsia", target_os = "redox"))] +#[cfg(any( + linux_android, + target_os = "fuchsia", + target_os = "redox", + target_os = "cygwin" +))] #[macro_use] mod linux; -#[cfg(any(linux_android, target_os = "fuchsia", target_os = "redox"))] +#[cfg(any( + linux_android, + target_os = "fuchsia", + target_os = "redox", + target_os = "cygwin" +))] pub use self::linux::*; #[cfg(any(bsd, solarish, target_os = "haiku",))] diff --git a/src/sys/mod.rs b/src/sys/mod.rs index ad5cbcd7e0..07b52d630c 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -40,6 +40,7 @@ feature! { solarish, target_os = "fuchsia", target_os = "redox", + target_os = "cygwin", ))] #[cfg(feature = "ioctl")] #[cfg_attr(docsrs, doc(cfg(feature = "ioctl")))]