diff --git a/src/unix/bsd/freebsdlike/dragonfly/errno.rs b/src/unix/bsd/freebsdlike/dragonfly/errno.rs deleted file mode 100644 index e9ad63b86bb2d15eb96e0816de892834e4bd1487..0000000000000000000000000000000000000000 --- a/src/unix/bsd/freebsdlike/dragonfly/errno.rs +++ /dev/null @@ -1,12 +0,0 @@ -// DragonFlyBSD's __error function is declared with "static inline", so it must -// be implemented in the libc crate, as a pointer to a static thread_local. -f! { - pub fn __error() -> *mut ::c_int { - &mut errno - } -} - -extern "C" { - #[thread_local] - pub static mut errno: ::c_int; -} diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 4a15c3b89a88eb01e8fb29a0ed0f0735f469d6d6..26799e618f780836bb0938f4a22b257cdd9aed5d 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -1044,6 +1044,7 @@ f! { } extern "C" { + pub fn __errno_location() -> *mut ::c_int; pub fn setgrent(); pub fn mprotect( addr: *mut ::c_void, @@ -1077,10 +1078,3 @@ extern "C" { needlelen: ::size_t, ) -> *mut ::c_void; } - -cfg_if! { - if #[cfg(libc_thread_local)] { - mod errno; - pub use self::errno::*; - } -}