summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/extconf.rb3
-rw-r--r--ext/socket/socket.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 449d5a2..5b39867 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -9,6 +9,9 @@ when /cygwin32/
when /beos/
test_func = "socket"
have_library("net", "socket")
+when /i386-os2_emx/
+ test_func = "socket"
+ have_library("socket", "socket")
else
test_func = "socket"
have_library("nsl", "t_open")
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index fcf8f18..b7502e2 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -19,6 +19,9 @@
#include <netdb.h>
#endif
#include <errno.h>
+#ifdef __EMX__
+#undef HAVE_SYS_UN_H
+#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
@@ -1244,7 +1247,7 @@ static VALUE
sock_s_socketpair(class, domain, type, protocol)
VALUE class, domain, type, protocol;
{
-#if !defined(NT) && !defined(__BEOS__)
+#if !defined(NT) && !defined(__BEOS__) && !defined(__EMX__)
int d, t, sp[2];
setup_domain_and_type(domain, &d, type, &t);