diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-02 19:44:42 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-02 19:44:42 +0000 |
commit | c76ff0753e4ac2ab389369227add0fe008159616 (patch) | |
tree | af324418dd169533f851e40d9851c5ecf8a33613 /ext/socket/extconf.rb | |
parent | b23b5ed620e2fd4f1f8af52f80c6b0c87deec110 (diff) | |
download | ruby-c76ff0753e4ac2ab389369227add0fe008159616.tar.gz |
* ext/socket/extconf.rb: check arpa/inet.h for ntohs.
* ext/socket/socket.c: include arpa/inet.h if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r-- | ext/socket/extconf.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 125ef6be20..1441dee4c0 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -25,6 +25,9 @@ if /solaris/ =~ RUBY_PLATFORM and !try_compile("") # bug of gcc 3.0 on Solaris 8 ? headers << "sys/feature_tests.h" end +if have_header("arpa/inet.h") + headers << "arpa/inet.h" +end ipv6 = false default_ipv6 = /cygwin/ !~ RUBY_PLATFORM @@ -237,7 +240,6 @@ unless getaddr_info_ok and have_func("getnameinfo", "netdb.h") and have_func("ge have_func("inet_ntop") or have_func("inet_ntoa") have_func("inet_pton") or have_func("inet_aton") have_func("getservbyport") - have_header("arpa/inet.h") have_header("arpa/nameser.h") have_header("resolv.h") end |