diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/errno/src | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/errno/src')
-rw-r--r-- | vendor/errno/src/hermit.rs | 2 | ||||
-rw-r--r-- | vendor/errno/src/unix.rs | 19 |
2 files changed, 14 insertions, 7 deletions
diff --git a/vendor/errno/src/hermit.rs b/vendor/errno/src/hermit.rs index 99d4c3286..331b6b152 100644 --- a/vendor/errno/src/hermit.rs +++ b/vendor/errno/src/hermit.rs @@ -14,7 +14,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use Errno; +use crate::Errno; pub fn with_description<F, T>(_err: Errno, callback: F) -> T where diff --git a/vendor/errno/src/unix.rs b/vendor/errno/src/unix.rs index 2f0286000..86a35d9be 100644 --- a/vendor/errno/src/unix.rs +++ b/vendor/errno/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" @@ -67,7 +64,8 @@ extern "C" { target_os = "openbsd", target_os = "netbsd", target_os = "bitrig", - target_os = "android" + target_os = "android", + target_os = "espidf" ), link_name = "__errno" )] @@ -77,12 +75,21 @@ extern "C" { )] #[cfg_attr(target_os = "haiku", link_name = "_errnop")] #[cfg_attr( - any(target_os = "linux", 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")] + #[cfg_attr(target_os = "nto", link_name = "__get_errno_ptr")] fn errno_location() -> *mut c_int; - #[cfg_attr(target_os = "linux", link_name = "__xpg_strerror_r")] + #[cfg_attr( + any(target_os = "linux", target_os = "hurd"), + link_name = "__xpg_strerror_r" + )] fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; } |