diff --git a/Cargo.toml b/Cargo.toml index 354d809..a2d5360 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,6 @@ features = [ "Win32_System_Diagnostics_Debug", ] -[target.'cfg(target_os="dragonfly")'.dependencies] -errno-dragonfly = "0.1.2" - [target.'cfg(target_os="wasi")'.dependencies] libc = { version = "0.2", default-features = false } diff --git a/src/unix.rs b/src/unix.rs index c61528a..86a35d9 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -13,8 +13,6 @@ // except according to those terms. use core::str; -#[cfg(target_os = "dragonfly")] -use errno_dragonfly::errno_location; use libc::{self, c_char, c_int, size_t, strlen}; use crate::Errno; @@ -57,7 +55,6 @@ pub fn set_errno(Errno(errno): Errno) { } extern "C" { - #[cfg(not(target_os = "dragonfly"))] #[cfg_attr( any(target_os = "macos", target_os = "ios", target_os = "freebsd"), link_name = "__error" @@ -78,7 +75,12 @@ extern "C" { )] #[cfg_attr(target_os = "haiku", link_name = "_errnop")] #[cfg_attr( - any(target_os = "linux", target_os = "hurd", target_os = "redox"), + any( + target_os = "linux", + target_os = "hurd", + target_os = "redox", + target_os = "dragonfly" + ), link_name = "__errno_location" )] #[cfg_attr(target_os = "aix", link_name = "_Errno")]