diff options
-rw-r--r-- | ext/kgio/kgio.h | 3 | ||||
-rw-r--r-- | ext/kgio/poll.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/ext/kgio/kgio.h b/ext/kgio/kgio.h index 1fdc36d..9056cef 100644 --- a/ext/kgio/kgio.h +++ b/ext/kgio/kgio.h @@ -43,5 +43,8 @@ void kgio_autopush_send(VALUE); VALUE kgio_call_wait_writable(VALUE io); VALUE kgio_call_wait_readable(VALUE io); +#if defined(HAVE_RB_THREAD_BLOCKING_REGION) && defined(HAVE_POLL) +# define USE_KGIO_POLL +#endif /* USE_KGIO_POLL */ #endif /* KGIO_H */ diff --git a/ext/kgio/poll.c b/ext/kgio/poll.c index 41caafd..0a4cf5a 100644 --- a/ext/kgio/poll.c +++ b/ext/kgio/poll.c @@ -1,5 +1,5 @@ #include "kgio.h" -#if defined(HAVE_RB_THREAD_BLOCKING_REGION) && defined(HAVE_POLL) +#if defined(USE_KGIO_POLL) #include <poll.h> #ifdef HAVE_RUBY_ST_H # include <ruby/st.h> @@ -179,8 +179,8 @@ void init_kgio_poll(void) c(POLLHUP); c(POLLNVAL); } -#else /* ! HAVE_RB_THREAD_BLOCKING_REGION */ +#else /* ! USE_KGIO_POLL */ void init_kgio_poll(void) { } -#endif /* ! HAVE_RB_THREAD_BLOCKIONG_REGION */ +#endif /* ! USE_KGIO_POLL */ |