|
| 1 | +use cfg_if::cfg_if; |
1 | 2 | #[cfg(not(target_os = "dragonfly"))] |
2 | | -use libc; |
3 | 3 | use libc::{c_int, c_void}; |
4 | 4 | use std::{fmt, io, error}; |
5 | | -use {Error, Result}; |
| 5 | +use crate::{Error, Result}; |
6 | 6 |
|
7 | 7 | pub use self::consts::*; |
8 | 8 |
|
@@ -584,8 +584,6 @@ fn desc(errno: Errno) -> &'static str { |
584 | 584 |
|
585 | 585 | #[cfg(any(target_os = "linux", target_os = "android"))] |
586 | 586 | mod consts { |
587 | | - use libc; |
588 | | - |
589 | 587 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
590 | 588 | #[repr(i32)] |
591 | 589 | pub enum Errno { |
@@ -873,8 +871,6 @@ mod consts { |
873 | 871 |
|
874 | 872 | #[cfg(any(target_os = "macos", target_os = "ios"))] |
875 | 873 | mod consts { |
876 | | - use libc; |
877 | | - |
878 | 874 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
879 | 875 | #[repr(i32)] |
880 | 876 | pub enum Errno { |
@@ -1110,8 +1106,6 @@ mod consts { |
1110 | 1106 |
|
1111 | 1107 | #[cfg(target_os = "freebsd")] |
1112 | 1108 | mod consts { |
1113 | | - use libc; |
1114 | | - |
1115 | 1109 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
1116 | 1110 | #[repr(i32)] |
1117 | 1111 | pub enum Errno { |
@@ -1328,8 +1322,6 @@ mod consts { |
1328 | 1322 |
|
1329 | 1323 | #[cfg(target_os = "dragonfly")] |
1330 | 1324 | mod consts { |
1331 | | - use libc; |
1332 | | - |
1333 | 1325 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
1334 | 1326 | #[repr(i32)] |
1335 | 1327 | pub enum Errno { |
@@ -1543,8 +1535,6 @@ mod consts { |
1543 | 1535 |
|
1544 | 1536 | #[cfg(target_os = "openbsd")] |
1545 | 1537 | mod consts { |
1546 | | - use libc; |
1547 | | - |
1548 | 1538 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
1549 | 1539 | #[repr(i32)] |
1550 | 1540 | pub enum Errno { |
@@ -1757,8 +1747,6 @@ mod consts { |
1757 | 1747 |
|
1758 | 1748 | #[cfg(target_os = "netbsd")] |
1759 | 1749 | mod consts { |
1760 | | - use libc; |
1761 | | - |
1762 | 1750 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
1763 | 1751 | #[repr(i32)] |
1764 | 1752 | pub enum Errno { |
@@ -1973,8 +1961,6 @@ mod consts { |
1973 | 1961 |
|
1974 | 1962 | #[cfg(target_os = "redox")] |
1975 | 1963 | mod consts { |
1976 | | - use libc; |
1977 | | - |
1978 | 1964 | #[derive(Clone, Copy, Debug, Eq, PartialEq)] |
1979 | 1965 | #[repr(i32)] |
1980 | 1966 | pub enum Errno { |
|
0 commit comments