diff options
| author | Yuta Saito <kateinoigakukun@gmail.com> | 2022-01-19 12:16:56 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-01-19 13:19:58 +0900 |
| commit | 8c21701968f8d877156c4c1616b823b7fd382021 (patch) | |
| tree | a081835136eb2239bac77c4624c342b21bcf7f55 /include/ruby/io.h | |
| parent | 68e821c3e575b0905a9ee992b93ccbbaa42b6dc5 (diff) | |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5461
Diffstat (limited to 'include/ruby/io.h')
| -rw-r--r-- | include/ruby/io.h | 7 |
1 files 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 |
