summaryrefslogtreecommitdiff
path: root/ext/socket/getaddrinfo.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-10 04:49:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-10 04:49:24 +0000
commitc67a74570dd056569763f5015e0aafa7d454fca7 (patch)
treef1dda39296b6911752cd4b6446a21f2e54ff68e1 /ext/socket/getaddrinfo.c
parent3043170b14875ce53f3a951d665279b12c2c63a8 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/getaddrinfo.c')
-rw-r--r--ext/socket/getaddrinfo.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index c312b92..d518017 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -42,9 +42,15 @@
#include <sys/types.h>
#ifndef NT
#include <sys/param.h>
-#include <sys/socket.h>
+#if defined(__BEOS__)
+# include <net/socket.h>
+#else
+# include <sys/socket.h>
+#endif
#include <netinet/in.h>
+#if defined(HAVE_ARPA_INET_H)
#include <arpa/inet.h>
+#endif
#if defined(HAVE_ARPA_NAMESER_H)
#include <arpa/nameser.h>
#endif
@@ -330,12 +336,16 @@ getaddrinfo(hostname, servname, hints, res)
pai->ai_socktype = SOCK_STREAM;
break;
default:
+#if defined(SOCK_RAW)
pai->ai_socktype = SOCK_RAW;
+#endif
break;
}
break;
+#if defined(SOCK_RAW)
case SOCK_RAW:
break;
+#endif
case SOCK_DGRAM:
if (pai->ai_protocol != IPPROTO_UDP &&
pai->ai_protocol != ANY)