diff options
Diffstat (limited to 'ext/socket')
| -rw-r--r-- | ext/socket/extconf.rb | 4 | ||||
| -rw-r--r-- | ext/socket/rubysocket.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 330ee39c5f..ba180c820e 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 diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index d6f990eed9..3e2f6c9565 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -4,7 +4,6 @@ #include "ruby/ruby.h" #include "ruby/io.h" #include "ruby/util.h" -#include "ruby/subst.h" #include "internal.h" #include <stdio.h> #include <sys/types.h> |
