summaryrefslogtreecommitdiffstats
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-02 19:44:42 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-02 19:44:42 +0000
commit455c7946e110bace9b921d2ad22bec44c6990a1c (patch)
treeaf324418dd169533f851e40d9851c5ecf8a33613 /ext/socket/socket.c
parentea5083bfb5d5b66bab17fc2131070cb8e0b6f431 (diff)
downloadruby-455c7946e110bace9b921d2ad22bec44c6990a1c.tar.gz
ruby-455c7946e110bace9b921d2ad22bec44c6990a1c.tar.xz
ruby-455c7946e110bace9b921d2ad22bec44c6990a1c.zip
* ext/socket/extconf.rb: check arpa/inet.h for ntohs.
* ext/socket/socket.c: include arpa/inet.h if available. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r--ext/socket/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 8cc850b8a..bb462f2fb 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -41,6 +41,9 @@
#ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h>
#endif
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
#include <netdb.h>
#endif
#include <errno.h>