diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-06 14:58:30 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-06 14:58:30 +0000 |
commit | 307cc90e998ffc98c18a31a3f6ac1660ffe7734b (patch) | |
tree | 5049ae619c621aeae8e3f540af9d6b90134b25d0 /src | |
parent | f2780946875817c41b8de1dadb1904652b697e60 (diff) | |
parent | 9d2dc7c4d6af225b16edbd94f2c1e72cb831d6e6 (diff) | |
download | nix-307cc90e998ffc98c18a31a3f6ac1660ffe7734b.zip |
Merge #989
989: DragonflyBSD: Remove unused Errno's r=asomers a=levex
EUNUSED* were removed from <sys/errno.h> in DragonflyBSD, so there is no
need for them to be in nix either. This also fixes the build on
DragonflyBSD.
r? @asomers
cc/ @mneumann
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
Co-authored-by: Levente Kurusa <lkurusa@acm.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/errno.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/errno.rs b/src/errno.rs index 0a38ab69..2f07a104 100644 --- a/src/errno.rs +++ b/src/errno.rs @@ -1,6 +1,6 @@ #[cfg(not(target_os = "dragonfly"))] use libc; -use libc::c_int; +use libc::{c_int, c_void}; use std::{fmt, io, error}; use {Error, Result}; @@ -103,8 +103,8 @@ impl ErrnoSentinel for i64 { fn sentinel() -> Self { -1 } } -impl ErrnoSentinel for *mut libc::c_void { - fn sentinel() -> Self { (-1 as isize) as *mut libc::c_void } +impl ErrnoSentinel for *mut c_void { + fn sentinel() -> Self { (-1 as isize) as *mut c_void } } impl error::Error for Errno { @@ -522,9 +522,6 @@ fn desc(errno: Errno) -> &'static str { EIPSEC => "IPsec processing failure", #[cfg(target_os = "dragonfly")] - EUNUSED94 | EUNUSED95 | EUNUSED96 | EUNUSED97 | EUNUSED98 => "Unused", - - #[cfg(target_os = "dragonfly")] EASYNC => "Async", } } @@ -1373,11 +1370,6 @@ mod consts { ENOLINK = libc::ENOLINK, EPROTO = libc::EPROTO, ENOMEDIUM = libc::ENOMEDIUM, - EUNUSED94 = libc::EUNUSED94, - EUNUSED95 = libc::EUNUSED95, - EUNUSED96 = libc::EUNUSED96, - EUNUSED97 = libc::EUNUSED97, - EUNUSED98 = libc::EUNUSED98, EASYNC = libc::EASYNC, } @@ -1485,11 +1477,6 @@ mod consts { libc::ENOLINK => ENOLINK, libc::EPROTO => EPROTO, libc::ENOMEDIUM => ENOMEDIUM, - libc::EUNUSED94 => EUNUSED94, - libc::EUNUSED95 => EUNUSED95, - libc::EUNUSED96 => EUNUSED96, - libc::EUNUSED97 => EUNUSED97, - libc::EUNUSED98 => EUNUSED98, libc::EASYNC => EASYNC, _ => UnknownErrno, } |