mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
include/ruby/io.h: use 0 as POLLPRI when no support for it
0x003 is not suitable as a bit mask, and it's ok just to be 0 to avoid setting unsupported bit.
This commit is contained in:
parent
68e821c3e5
commit
8c21701968
Notes:
git
2022-01-19 13:20:19 +09:00
1 changed files with 3 additions and 4 deletions
|
@ -35,11 +35,10 @@
|
|||
# undef revents
|
||||
# endif
|
||||
# define RB_WAITFD_IN POLLIN
|
||||
# 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
|
||||
# if defined(POLLPRI)
|
||||
# define RB_WAITFD_PRI POLLPRI
|
||||
# else
|
||||
# define RB_WAITFD_PRI 0
|
||||
# endif
|
||||
# define RB_WAITFD_OUT POLLOUT
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue