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:
parent
4f579ecfce
commit
50f1468bfd
Notes:
git
2022-01-19 11:19:36 +09:00
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue