summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-12 04:53:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-10-12 04:53:36 +0000
commitbe1fea072cd0d22788ef8a931c0c6b64a2503b5d (patch)
tree4d17e3f2cabbe9f4ea2bee8f523de11ce30f6a39 /ext/socket
parent758cb647c7ac9e02a9ee0d7cb0934a5c963481e0 (diff)
19991012
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/extconf.rb2
-rw-r--r--ext/socket/socket.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index f2eddc0bba..47addfeff8 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -149,6 +149,8 @@ EOF
end
have_header("sys/sysctl.h")
+have_header("netinet/tcp.h")
+have_header("netinet/udp.h")
$getaddr_info_ok = false
if try_run(<<EOF)
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index f7840948f8..a1d707122e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -16,6 +16,12 @@
#ifndef NT
#include <sys/socket.h>
#include <netinet/in.h>
+#ifdef NETINET_TCP
+# include <netinet/tcp.h>
+#endif
+#ifdef NETINET_UDP
+# include <netinet/udp.h>
+#endif
#include <netdb.h>
#endif
#include <errno.h>