Skip to content

Commit 61369d4

Browse files
libc-wasi/posix.c: Fix POLL{RD,WR}NORM in uClibc (#2069)
POLLRDNORM/POLLWRNORM may be not defined in uClibc, so replace them with the equivalent POLLIN/POLLOUT. Refer to https://www.man7.org/linux/man-pages/man2/poll.2.html POLLRDNORM Equivalent to POLLIN POLLWRNORM Equivalent to POLLOUT Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
1 parent d0fb271 commit 61369d4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2655,8 +2655,8 @@ wasmtime_ssp_poll_oneoff(
26552655
pfds[i] = (struct pollfd){
26562656
.fd = fd_number(fos[i]),
26572657
.events = s->u.type == __WASI_EVENTTYPE_FD_READ
2658-
? POLLRDNORM
2659-
: POLLWRNORM,
2658+
? POLLIN
2659+
: POLLOUT,
26602660
};
26612661
}
26622662
else {
@@ -2767,7 +2767,7 @@ wasmtime_ssp_poll_oneoff(
27672767
__WASI_EVENT_FD_READWRITE_HANGUP,
27682768
};
27692769
}
2770-
else if ((pfds[i].revents & (POLLRDNORM | POLLWRNORM)) != 0) {
2770+
else if ((pfds[i].revents & (POLLIN | POLLOUT)) != 0) {
27712771
// Read or write possible.
27722772
out[(*nevents)++] = (__wasi_event_t){
27732773
.userdata = in[i].userdata,

0 commit comments

Comments
 (0)