Skip to content

Commit f64eeb2

Browse files
committed
Consolidate bsd and illumos ioctl
1 parent 99981ee commit f64eeb2

File tree

3 files changed

+9
-99
lines changed

3 files changed

+9
-99
lines changed

src/sys/ioctl/bsd.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/// The datatype used for the ioctl number
22
#[doc(hidden)]
3+
#[cfg(not(target_os = "illumos"))]
34
pub type ioctl_num_type = ::libc::c_ulong;
5+
6+
#[doc(hidden)]
7+
#[cfg(target_os = "illumos")]
8+
pub type ioctl_num_type = ::libc::c_int;
9+
410
/// The datatype used for the 3rd argument
511
#[doc(hidden)]
612
pub type ioctl_param_type = ::libc::c_int;
@@ -12,6 +18,7 @@ mod consts {
1218
#[doc(hidden)]
1319
pub const OUT: ioctl_num_type = 0x4000_0000;
1420
#[doc(hidden)]
21+
#[allow(overflowing_literals)]
1522
pub const IN: ioctl_num_type = 0x8000_0000;
1623
#[doc(hidden)]
1724
pub const INOUT: ioctl_num_type = IN|OUT;

src/sys/ioctl/illumos.rs

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/sys/ioctl/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ pub use self::linux::*;
232232

233233
#[cfg(any(target_os = "dragonfly",
234234
target_os = "freebsd",
235+
target_os = "illumos",
235236
target_os = "ios",
236237
target_os = "macos",
237238
target_os = "netbsd",
@@ -241,19 +242,13 @@ mod bsd;
241242

242243
#[cfg(any(target_os = "dragonfly",
243244
target_os = "freebsd",
245+
target_os = "illumos",
244246
target_os = "ios",
245247
target_os = "macos",
246248
target_os = "netbsd",
247249
target_os = "openbsd"))]
248250
pub use self::bsd::*;
249251

250-
#[cfg(target_os = "illumos")]
251-
#[macro_use]
252-
mod illumos;
253-
254-
#[cfg(target_os = "illumos")]
255-
pub use self::illumos::*;
256-
257252
/// Convert raw ioctl return value to a Nix result
258253
#[macro_export]
259254
#[doc(hidden)]

0 commit comments

Comments
 (0)