Skip to content

Commit 58d771c

Browse files
committed
Add ioctl support for Fuchsia
Fuchsia supports the linux-style ioctl api.
1 parent 33efb1a commit 58d771c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/sys/ioctl/linux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use cfg_if::cfg_if;
22

33
/// The datatype used for the ioctl number
4-
#[cfg(any(target_os = "android", target_env = "musl"))]
4+
#[cfg(any(target_os = "android", target_os = "fuchsia", target_env = "musl"))]
55
#[doc(hidden)]
66
pub type ioctl_num_type = ::libc::c_int;
7-
#[cfg(not(any(target_os = "android", target_env = "musl")))]
7+
#[cfg(not(any(target_os = "android", target_os = "fuchsia", target_env = "musl")))]
88
#[doc(hidden)]
99
pub type ioctl_num_type = ::libc::c_ulong;
1010
/// The datatype used for the 3rd argument

src/sys/ioctl/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@
227227
//! ```
228228
use cfg_if::cfg_if;
229229

230-
#[cfg(any(linux_android, target_os = "redox"))]
230+
#[cfg(any(linux_android, target_os = "redox", target_os = "fuchsia"))]
231231
#[macro_use]
232232
mod linux;
233233

234-
#[cfg(any(linux_android, target_os = "redox"))]
234+
#[cfg(any(linux_android, target_os = "redox", target_os = "fuchsia"))]
235235
pub use self::linux::*;
236236

237237
#[cfg(any(bsd, solarish, target_os = "haiku",))]

src/sys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ feature! {
3131
pub mod fanotify;
3232
}
3333

34-
#[cfg(any(bsd, linux_android, target_os = "redox", solarish))]
34+
#[cfg(any(bsd, linux_android, target_os = "redox", target_os = "fuchsia", solarish))]
3535
#[cfg(feature = "ioctl")]
3636
#[cfg_attr(docsrs, doc(cfg(feature = "ioctl")))]
3737
#[macro_use]

0 commit comments

Comments
 (0)