From 9557819c7c3295a4237b9b70fa87ce4d3eb08266 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 22 Sep 2023 18:57:01 +0200 Subject: [PATCH] Add GNU/Hurd support (#80) --- src/unix.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/unix.rs b/src/unix.rs index ff06591..c61528a 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -78,13 +78,16 @@ 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"), 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; }