diff --git a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c index 9e29a3bac..61e841836 100644 --- a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c +++ b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c @@ -2655,8 +2655,8 @@ wasmtime_ssp_poll_oneoff( pfds[i] = (struct pollfd){ .fd = fd_number(fos[i]), .events = s->u.type == __WASI_EVENTTYPE_FD_READ - ? POLLRDNORM - : POLLWRNORM, + ? POLLIN + : POLLOUT, }; } else { @@ -2767,7 +2767,7 @@ wasmtime_ssp_poll_oneoff( __WASI_EVENT_FD_READWRITE_HANGUP, }; } - else if ((pfds[i].revents & (POLLRDNORM | POLLWRNORM)) != 0) { + else if ((pfds[i].revents & (POLLIN | POLLOUT)) != 0) { // Read or write possible. out[(*nevents)++] = (__wasi_event_t){ .userdata = in[i].userdata,