Skip to content

Commit

Permalink
Feature gate Unix-specific polling code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark McCaskey committed Aug 14, 2019
1 parent 3434069 commit ec20e32
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/wasi/src/state/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ pub fn iterate_poll_events(pes: PollEventSet) -> PollEventIter {
PollEventIter { pes, i: 0 }
}

#[cfg(unix)]
fn poll_event_set_to_platform_poll_events(mut pes: PollEventSet) -> i16 {
let mut out = 0;
for i in 0..16 {
Expand All @@ -259,6 +260,7 @@ fn poll_event_set_to_platform_poll_events(mut pes: PollEventSet) -> i16 {
out
}

#[cfg(unix)]
fn platform_poll_events_to_pollevent_set(mut num: i16) -> PollEventSet {
let mut peb = PollEventBuilder::new();
for i in 0..16 {
Expand Down Expand Up @@ -324,9 +326,9 @@ pub(crate) fn poll(

#[cfg(not(unix))]
pub(crate) fn poll(
selfs: &[&dyn WasiFile],
events: &[PollEventSet],
seen_events: &mut [PollEventSet],
_selfs: &[&dyn WasiFile],
_events: &[PollEventSet],
_seen_events: &mut [PollEventSet],
) -> Result<(), WasiFsError> {
unimplemented!("HostFile::poll in WasiFile is not implemented for non-Unix-like targets yet");
}
Expand Down

0 comments on commit ec20e32

Please sign in to comment.