summaryrefslogtreecommitdiff
path: root/src/sys/ioctl/mod.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2020-05-31 15:17:16 -0600
committerAlan Somers <asomers@gmail.com>2020-05-31 19:07:15 -0600
commit1ae5dd8b16aed61958fd3ce488ed7fd459743652 (patch)
tree17c28555c9b2cd3db3741dcd28b7401d08ad3678 /src/sys/ioctl/mod.rs
parent84e66d7a29234d16d62c5fa5bc5b66ad5504c2a2 (diff)
downloadnix-1ae5dd8b16aed61958fd3ce488ed7fd459743652.zip
Convert the crate to edition 2018
Diffstat (limited to 'src/sys/ioctl/mod.rs')
-rw-r--r--src/sys/ioctl/mod.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs
index 3bcdd266..60f169db 100644
--- a/src/sys/ioctl/mod.rs
+++ b/src/sys/ioctl/mod.rs
@@ -221,6 +221,8 @@
//!
//! # fn main() {}
//! ```
+use cfg_if::cfg_if;
+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "redox"))]
#[macro_use]
mod linux;
@@ -317,7 +319,6 @@ macro_rules! ioctl_none {
///
/// ```no_run
/// # #[macro_use] extern crate nix;
-/// # extern crate libc;
/// # use libc::TIOCNXCL;
/// # use std::fs::File;
/// # use std::os::unix::io::AsRawFd;
@@ -396,7 +397,6 @@ macro_rules! ioctl_read {
/// # Example
///
/// ```
-/// # extern crate libc;
/// # #[macro_use] extern crate nix;
/// # #[cfg(any(target_os = "android", target_os = "linux"))]
/// ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios);
@@ -470,7 +470,6 @@ macro_rules! ioctl_write_ptr {
/// # Example
///
/// ```
-/// # extern crate libc;
/// # #[macro_use] extern crate nix;
/// # #[cfg(any(target_os = "android", target_os = "linux"))]
/// ioctl_write_ptr_bad!(tcsets, libc::TCSETS, libc::termios);
@@ -590,7 +589,6 @@ cfg_if!{
/// # Examples
///
/// ```
-/// # extern crate libc;
/// # #[macro_use] extern crate nix;
/// # #[cfg(any(target_os = "android", target_os = "linux"))]
/// ioctl_write_int_bad!(tcsbrk, libc::TCSBRK);