about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--ext/kgio/write.c2
-rw-r--r--test/test_syssend.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/kgio/write.c b/ext/kgio/write.c
index 04f2866..ad34bdd 100644
--- a/ext/kgio/write.c
+++ b/ext/kgio/write.c
@@ -261,7 +261,7 @@ void init_kgio_write(void)
         rb_define_method(mSocketMethods, "kgio_write", kgio_send, 1);
         rb_define_method(mSocketMethods, "kgio_trywrite", kgio_trysend, 1);
 
-#ifdef USE_MSG_DONTWAIT
+#if defined(KGIO_HAVE_THREAD_CALL_WITHOUT_GVL)
         rb_define_method(mSocketMethods, "kgio_syssend", kgio_syssend, 2);
 #endif
 }
diff --git a/test/test_syssend.rb b/test/test_syssend.rb
index 5089ce3..7d2511a 100644
--- a/test/test_syssend.rb
+++ b/test/test_syssend.rb
@@ -40,4 +40,4 @@ class TestKgioSyssend < Test::Unit::TestCase
   ensure
     [ srv, acc, client ].each { |io| io.close if io }
   end
-end if RUBY_PLATFORM =~ /linux/
+end if RUBY_PLATFORM =~ /linux/ && Socket.const_defined?(:MSG_MORE)