summaryrefslogtreecommitdiffstats
path: root/vendor/errno/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/errno/src')
-rw-r--r--vendor/errno/src/hermit.rs2
-rw-r--r--vendor/errno/src/unix.rs19
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;
}