aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2022-01-19 12:16:56 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-01-19 13:19:58 +0900
commit8c21701968f8d877156c4c1616b823b7fd382021 (patch)
treea081835136eb2239bac77c4624c342b21bcf7f55 /include
parent68e821c3e575b0905a9ee992b93ccbbaa42b6dc5 (diff)
downloadruby-8c21701968f8d877156c4c1616b823b7fd382021.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/io.h7
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