Skip to content

Commit

Permalink
Add GNU/Hurd support (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
sthibaul authored Sep 22, 2023
1 parent 5389c0e commit 9557819
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 9557819

Please sign in to comment.