summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-06 17:12:31 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-06 17:12:31 +0000
commit1f0125e4aafceca63b4ce353dbb58e66c1052bd8 (patch)
tree19590eb73c6a2a2f2dd2d003b8068521939a3545 /ext/socket/extconf.rb
parent765c659f759d655247f25c7474dc5d47618c9756 (diff)
* ext/socket/extconf.rb (sockaddr_storage): winsock2.h have the
definition of struct sockaddr_storage, but socket.c doesn't include it because this version of ruby still has binary level compatibility with winsock1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 7842899520..076f8bf7d7 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -108,8 +108,9 @@ end
# doug's fix, NOW add -Dss_family... only if required!
doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)}
-if doug[] or
- with_cppflags($CPPFLAGS + " -Dss_family=__ss_family -Dss_len=__ss_len", &doug)
+if /mswin32|mingw/ !~ RUBY_PLATFORM and
+ (doug[] or
+ with_cppflags($CPPFLAGS + " -Dss_family=__ss_family -Dss_len=__ss_len", &doug))
$defs[-1] = "-DHAVE_SOCKADDR_STORAGE"
end