summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 05:29:31 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 05:29:31 +0000
commit1dea1927752dfb4e09b2db6fc13589eb16a7e336 (patch)
tree613fdb72196751a6e5f08796f82b196cdaf1297d /ext/socket/extconf.rb
parent8229b9dd3f57a965872734f2b97f98a512979560 (diff)
* include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert
r33876. [ruby-core:41475] [Bug #5706] * ext/socket/extconf.rb: the alternative hack for [Bug #5675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 330ee39..ba180c8 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -483,7 +483,9 @@ $distcleanfiles << "constants.h" << "constdefs.*"
if have_func(test_func)
have_func("hsterror")
have_func("getipnodebyname") or have_func("gethostbyname2")
- have_func("socketpair(0, 0, 0, 0)")
+ if !have_func("socketpair(0, 0, 0, 0)") and have_func("rb_w32_socketpair(0, 0, 0, 0)")
+ $defs << "-Dsocketpair(a,b,c,d)=rb_w32_socketpair((a),(b),(c),(d))"
+ end
unless have_func("gethostname((char *)0, 0)")
have_func("uname")
end