summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-16 06:14:25 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-16 06:14:25 +0000
commit2048950e16974f14159f9945fa8be576b6022b2a (patch)
tree80d7c3f75be43dae531075b4740642ae8f751584
parentee51586edaf1b1c2d1035c880d8818e444ea41d6 (diff)
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::Nonblock#initialize):
native win32 platform doesn't have F_GETFL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/openssl/lib/openssl/ssl.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fb31298acf..e639a2782d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 16 15:11:43 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * ext/openssl/lib/openssl/ssl.rb (OpenSSL::Nonblock#initialize):
+ native win32 platform doesn't have F_GETFL.
+
Wed Feb 16 02:47:45 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl_ssl.c (ossl_ssl_read, ossl_ssl_write): should
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb
index 7f61fc2a62..441890865b 100644
--- a/ext/openssl/lib/openssl/ssl.rb
+++ b/ext/openssl/lib/openssl/ssl.rb
@@ -52,7 +52,8 @@ module OpenSSL
module Nonblock
def initialize(*args)
- flag = @io.fcntl(Fcntl::F_GETFL) | File::NONBLOCK
+ flag = File::NONBLOCK
+ flag |= @io.fcntl(Fcntl::F_GETFL) if defined?(Fcntl::F_GETFL)
@io.fcntl(Fcntl::F_SETFL, flag)
super
end