1
0
Fork 0
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:
Yuta Saito 2022-01-19 12:16:56 +09:00 committed by Nobuyoshi Nakada
parent 68e821c3e5
commit 8c21701968
Notes: git 2022-01-19 13:20:19 +09:00

View file

@ -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