mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
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>
This commit is contained in:
parent
d0fb2716b6
commit
61369d48fd
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user