avoid warning for rb_thread_io_blocking_region
authorEric Wong <normalperson@yhbt.net>
Sat, 12 May 2012 05:38:58 +0000 (12 05:38 +0000)
committerEric Wong <normalperson@yhbt.net>
Sat, 12 May 2012 05:38:58 +0000 (12 05:38 +0000)
This is exported (visibly) under Ruby 1.9.3 but not
in headers, so it was causing warnings.

ext/raindrops/linux_inet_diag.c

index e6d7366..89206bf 100644 (file)
@@ -33,7 +33,9 @@ rb_thread_blocking_region(
 }
 #endif /* ! HAVE_RB_THREAD_BLOCKING_REGION */
 
-#ifndef HAVE_RB_THREAD_IO_BLOCKING_REGION
+#ifdef HAVE_RB_THREAD_IO_BLOCKING_REGION
+VALUE rb_thread_io_blocking_region(rb_blocking_function_t *, void *, int);
+#else
 #  define rb_thread_io_blocking_region(fn,data,fd) \
       rb_thread_blocking_region((fn),(data),RUBY_UBF_IO,0)
 #endif /* HAVE_RB_THREAD_IO_BLOCKING_REGION */