summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-30 08:20:49 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-30 08:20:49 +0000
commit9885381a0771545278095bb5b3e6c8b24bb97ffc (patch)
treeb8aec97e5c2cd89188adf365524c704fa896180a /ext/socket/extconf.rb
parentb8669fe321c6f5e81d071d5790e51b9611fde860 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 0fc5042b7d..c83c65cc47 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -21,12 +21,13 @@ else
end
$ipv6 = false
-if enable_config("ipv6", "yes")
+if enable_config("ipv6", true)
if try_run(<<EOF)
#include <sys/types.h>
#include <sys/socket.h>
main()
{
+ exit(0);
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
else
@@ -38,6 +39,7 @@ EOF
end
end
+
$ipv6type = nil
$ipv6lib = nil
$ipv6libdir = nil
@@ -252,9 +254,10 @@ int
main()
{
struct sockaddr_storage storage;
- struct sockaddr_storage *addr;
+ struct sockaddr_storage *addr = 0;
- addr = &storage;
+ addr->_ss_family = &storage.__ss_family;
+ addr->_ss_len = &storage.__ss_len;
return 0;
}
EOF
@@ -268,11 +271,9 @@ else
end
if sockaddr_storage
- $CFLAGS="-DSOCKADDR_STORAGE "+$CFLAGS
+ $CFLAGS="-DSOCKADDR_STORAGE=sockaddr_storage "+$CFLAGS
end
-p $ipv6
-
have_header("sys/un.h")
if have_func(test_func)
have_func("hsterror")