Skip to content

Commit

Permalink
Support Hermit without cfg flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed May 26, 2024
1 parent c10c3aa commit a4f80c9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
23 changes: 19 additions & 4 deletions src/poll.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#[cfg(all(
unix,
not(mio_unsupported_force_poll_poll),
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
not(any(
target_os = "espidf",
target_os = "hermit",
target_os = "solaris",
target_os = "vita"
)),
))]
use std::os::unix::io::{AsRawFd, RawFd};
#[cfg(all(debug_assertions, not(target_os = "wasi")))]
Expand Down Expand Up @@ -430,7 +435,12 @@ impl Poll {
#[cfg(all(
unix,
not(mio_unsupported_force_poll_poll),
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
not(any(
target_os = "espidf",
target_os = "hermit",
target_os = "solaris",
target_os = "vita"
)),
))]
impl AsRawFd for Poll {
fn as_raw_fd(&self) -> RawFd {
Expand Down Expand Up @@ -721,7 +731,12 @@ impl fmt::Debug for Registry {
#[cfg(all(
unix,
not(mio_unsupported_force_poll_poll),
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
not(any(
target_os = "espidf",
target_os = "hermit",
target_os = "solaris",
target_os = "vita"
)),
))]
impl AsRawFd for Registry {
fn as_raw_fd(&self) -> RawFd {
Expand All @@ -733,7 +748,7 @@ cfg_os_poll! {
#[cfg(all(
unix,
not(mio_unsupported_force_poll_poll),
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
not(any(target_os = "espidf", target_os = "hermit", target_os = "solaris", target_os = "vita")),
))]
#[test]
pub fn as_raw_fd() {
Expand Down
4 changes: 1 addition & 3 deletions src/sys/unix/waker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,12 @@ mod eventfd {
any(
target_os = "android",
target_os = "espidf",
target_os = "hermit",
target_os = "linux",
)
))]
pub(crate) use self::eventfd::WakerInternal;

#[cfg(target_os = "hermit")]
pub(crate) use self::eventfd::WakerInternal;

#[cfg(all(
not(mio_unsupported_force_waker_pipe),
any(
Expand Down

0 comments on commit a4f80c9

Please sign in to comment.