From 1b6a04ca5504955c571d1c97504fb45ea0befee4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 8 Jan 2024 01:21:28 +0400 Subject: Initial vendor packages Signed-off-by: Valentin Popov --- vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs (limited to 'vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs') diff --git a/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs new file mode 100644 index 0000000..5fe6bb8 --- /dev/null +++ b/vendor/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs @@ -0,0 +1,13 @@ +// 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! { + #[deprecated(since = "0.2.77", note = "Use `__errno_location()` instead")] + pub fn __error() -> *mut ::c_int { + &mut errno + } +} + +extern "C" { + #[thread_local] + pub static mut errno: ::c_int; +} -- cgit v1.2.3