ruby-changes:70949
From: Yuta <ko1@a...>
Date: Wed, 19 Jan 2022 13:20:09 +0900 (JST)
Subject: [ruby-changes:70949] 8c21701968 (master): include/ruby/io.h: use 0 as POLLPRI when no support for it
https://git.ruby-lang.org/ruby.git/commit/?id=8c21701968 From 8c21701968f8d877156c4c1616b823b7fd382021 Mon Sep 17 00:00:00 2001 From: Yuta Saito <kateinoigakukun@g...> Date: Wed, 19 Jan 2022 12:16:56 +0900 Subject: 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 6ecf4053668..36857db8f82 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -35,11 +35,10 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L35 # 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/