Skip to content

Commit a4f80c9

Browse files
committed
Support Hermit without cfg flags
1 parent c10c3aa commit a4f80c9

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/poll.rs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#[cfg(all(
22
unix,
33
not(mio_unsupported_force_poll_poll),
4-
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
4+
not(any(
5+
target_os = "espidf",
6+
target_os = "hermit",
7+
target_os = "solaris",
8+
target_os = "vita"
9+
)),
510
))]
611
use std::os::unix::io::{AsRawFd, RawFd};
712
#[cfg(all(debug_assertions, not(target_os = "wasi")))]
@@ -430,7 +435,12 @@ impl Poll {
430435
#[cfg(all(
431436
unix,
432437
not(mio_unsupported_force_poll_poll),
433-
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
438+
not(any(
439+
target_os = "espidf",
440+
target_os = "hermit",
441+
target_os = "solaris",
442+
target_os = "vita"
443+
)),
434444
))]
435445
impl AsRawFd for Poll {
436446
fn as_raw_fd(&self) -> RawFd {
@@ -721,7 +731,12 @@ impl fmt::Debug for Registry {
721731
#[cfg(all(
722732
unix,
723733
not(mio_unsupported_force_poll_poll),
724-
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
734+
not(any(
735+
target_os = "espidf",
736+
target_os = "hermit",
737+
target_os = "solaris",
738+
target_os = "vita"
739+
)),
725740
))]
726741
impl AsRawFd for Registry {
727742
fn as_raw_fd(&self) -> RawFd {
@@ -733,7 +748,7 @@ cfg_os_poll! {
733748
#[cfg(all(
734749
unix,
735750
not(mio_unsupported_force_poll_poll),
736-
not(any(target_os = "espidf", target_os = "solaris", target_os = "vita")),
751+
not(any(target_os = "espidf", target_os = "hermit", target_os = "solaris", target_os = "vita")),
737752
))]
738753
#[test]
739754
pub fn as_raw_fd() {

src/sys/unix/waker.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,12 @@ mod eventfd {
168168
any(
169169
target_os = "android",
170170
target_os = "espidf",
171+
target_os = "hermit",
171172
target_os = "linux",
172173
)
173174
))]
174175
pub(crate) use self::eventfd::WakerInternal;
175176

176-
#[cfg(target_os = "hermit")]
177-
pub(crate) use self::eventfd::WakerInternal;
178-
179177
#[cfg(all(
180178
not(mio_unsupported_force_waker_pipe),
181179
any(

0 commit comments

Comments
 (0)