1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[wasm] include/ruby/io.h: define RB_WAITFD_PRI by ourselves for wasi

RB_WAITFD_PRI uses POLLPRI for other platforms, but wasi-libc doesn't
have POLLPRI for now.
This commit is contained in:
Yuta Saito 2021-12-15 15:49:59 +09:00
parent 4f579ecfce
commit 50f1468bfd
Notes: git 2022-01-19 11:19:36 +09:00

View file

@ -35,7 +35,12 @@
# undef revents # undef revents
# endif # endif
# define RB_WAITFD_IN POLLIN # define RB_WAITFD_IN POLLIN
# define RB_WAITFD_PRI POLLPRI # if defined(__wasi__) && !defined(POLLPRI)
// wasi-libc doesn't have POLLPRI and 0x002 is already reserved for POLLOUT, so use 0x003
# define RB_WAITFD_PRI 0x003
# else
# define RB_WAITFD_PRI POLLPRI
# endif
# define RB_WAITFD_OUT POLLOUT # define RB_WAITFD_OUT POLLOUT
#else #else
# define RB_WAITFD_IN 0x001 # define RB_WAITFD_IN 0x001