Skip to content

Commit

Permalink
Fix compilation on non-linux targets
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Nov 15, 2023
1 parent 50518d0 commit 5591037
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tokio/src/io/poll_evented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ impl<E: Source> PollEvented<E> {
Ok(inner)
}

#[cfg(feature = "process")]
#[cfg(all(feature = "process", target_os = "linux"))]
pub(crate) fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
self.registration
.poll_read_ready(cx)
.map_err(io::Error::from)
.map_ok(|_| ())
}

#[cfg(feature = "process")]
#[cfg(all(feature = "process", target_os = "linux"))]
pub(crate) fn scheduler_handle(&self) -> &scheduler::Handle {
self.registration.scheduler_handle()
}
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/io/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl Registration {
self.handle.driver().io()
}

#[cfg(feature = "process")]
#[cfg(all(feature = "process", target_os = "linux"))]
pub(crate) fn scheduler_handle(&self) -> &scheduler::Handle {
&self.handle
}
Expand Down

0 comments on commit 5591037

Please sign in to comment.