Skip to content

Commit 307cc90

Browse files
bors[bot]levex
andcommitted
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 <[email protected]> Co-authored-by: Levente Kurusa <[email protected]>
2 parents f278094 + 9d2dc7c commit 307cc90

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/errno.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[cfg(not(target_os = "dragonfly"))]
22
use libc;
3-
use libc::c_int;
3+
use libc::{c_int, c_void};
44
use std::{fmt, io, error};
55
use {Error, Result};
66

@@ -103,8 +103,8 @@ impl ErrnoSentinel for i64 {
103103
fn sentinel() -> Self { -1 }
104104
}
105105

106-
impl ErrnoSentinel for *mut libc::c_void {
107-
fn sentinel() -> Self { (-1 as isize) as *mut libc::c_void }
106+
impl ErrnoSentinel for *mut c_void {
107+
fn sentinel() -> Self { (-1 as isize) as *mut c_void }
108108
}
109109

110110
impl error::Error for Errno {
@@ -521,9 +521,6 @@ fn desc(errno: Errno) -> &'static str {
521521
#[cfg(target_os = "openbsd")]
522522
EIPSEC => "IPsec processing failure",
523523

524-
#[cfg(target_os = "dragonfly")]
525-
EUNUSED94 | EUNUSED95 | EUNUSED96 | EUNUSED97 | EUNUSED98 => "Unused",
526-
527524
#[cfg(target_os = "dragonfly")]
528525
EASYNC => "Async",
529526
}
@@ -1373,11 +1370,6 @@ mod consts {
13731370
ENOLINK = libc::ENOLINK,
13741371
EPROTO = libc::EPROTO,
13751372
ENOMEDIUM = libc::ENOMEDIUM,
1376-
EUNUSED94 = libc::EUNUSED94,
1377-
EUNUSED95 = libc::EUNUSED95,
1378-
EUNUSED96 = libc::EUNUSED96,
1379-
EUNUSED97 = libc::EUNUSED97,
1380-
EUNUSED98 = libc::EUNUSED98,
13811373
EASYNC = libc::EASYNC,
13821374
}
13831375

@@ -1485,11 +1477,6 @@ mod consts {
14851477
libc::ENOLINK => ENOLINK,
14861478
libc::EPROTO => EPROTO,
14871479
libc::ENOMEDIUM => ENOMEDIUM,
1488-
libc::EUNUSED94 => EUNUSED94,
1489-
libc::EUNUSED95 => EUNUSED95,
1490-
libc::EUNUSED96 => EUNUSED96,
1491-
libc::EUNUSED97 => EUNUSED97,
1492-
libc::EUNUSED98 => EUNUSED98,
14931480
libc::EASYNC => EASYNC,
14941481
_ => UnknownErrno,
14951482
}

0 commit comments

Comments
 (0)