Skip to content

Commit

Permalink
Add ioctl support for Fuchsia
Browse files Browse the repository at this point in the history
Fuchsia supports the linux-style ioctl api.
  • Loading branch information
erickt committed Jan 10, 2025
1 parent 33efb1a commit 58d771c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/sys/ioctl/linux.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use cfg_if::cfg_if;

/// The datatype used for the ioctl number
#[cfg(any(target_os = "android", target_env = "musl"))]
#[cfg(any(target_os = "android", target_os = "fuchsia", target_env = "musl"))]
#[doc(hidden)]
pub type ioctl_num_type = ::libc::c_int;
#[cfg(not(any(target_os = "android", target_env = "musl")))]
#[cfg(not(any(target_os = "android", target_os = "fuchsia", target_env = "musl")))]
#[doc(hidden)]
pub type ioctl_num_type = ::libc::c_ulong;
/// The datatype used for the 3rd argument
Expand Down
4 changes: 2 additions & 2 deletions src/sys/ioctl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@
//! ```
use cfg_if::cfg_if;

#[cfg(any(linux_android, target_os = "redox"))]
#[cfg(any(linux_android, target_os = "redox", target_os = "fuchsia"))]
#[macro_use]
mod linux;

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

#[cfg(any(bsd, solarish, target_os = "haiku",))]
Expand Down
2 changes: 1 addition & 1 deletion src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ feature! {
pub mod fanotify;
}

#[cfg(any(bsd, linux_android, target_os = "redox", solarish))]
#[cfg(any(bsd, linux_android, target_os = "redox", target_os = "fuchsia", solarish))]
#[cfg(feature = "ioctl")]
#[cfg_attr(docsrs, doc(cfg(feature = "ioctl")))]
#[macro_use]
Expand Down

0 comments on commit 58d771c

Please sign in to comment.