mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b8669fe321
commit
9885381a07
4 changed files with 27 additions and 41 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ extern int rb_thread_select(int, fd_set*, fd_set*, fd_set*, struct timeval*); /*
|
|||
#endif
|
||||
|
||||
#ifdef SOCKADDR_STORAGE
|
||||
# define ss_falily __ss_family
|
||||
# define ss_family __ss_family
|
||||
# define SS_LEN(ss) (ss)->__ss_len
|
||||
#else
|
||||
# define SOCKADDR_STORAGE sockaddr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue