linux_inet_diag: fix Ruby 2.2 (dev) build
authorEric Wong <normalperson@yhbt.net>
Tue, 18 Feb 2014 06:48:36 +0000 (18 06:48 +0000)
committerEric Wong <normalperson@yhbt.net>
Tue, 18 Feb 2014 06:48:36 +0000 (18 06:48 +0000)
Do not define or use rb_thread_blocking_region if
rb_thread_io_blocking_region is available.
rb_thread_blocking_region is gone entirely in Ruby trunk.

ext/raindrops/linux_inet_diag.c

index 7b5bae1..e4d0fab 100644 (file)
@@ -13,7 +13,8 @@
 #endif
 
 /* partial emulation of the 1.9 rb_thread_blocking_region under 1.8 */
-#ifndef HAVE_RB_THREAD_BLOCKING_REGION
+#if !defined(HAVE_RB_THREAD_BLOCKING_REGION) && \
+    !defined(HAVE_RB_THREAD_IO_BLOCKING_REGION)
 #  include <rubysig.h>
 #  define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
 typedef void rb_unblock_function_t(void *);