From 8c21701968f8d877156c4c1616b823b7fd382021 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Wed, 19 Jan 2022 12:16:56 +0900 Subject: [PATCH] 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. --- include/ruby/io.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/ruby/io.h b/include/ruby/io.h index 6ecf405366..36857db8f8 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -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