We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70dcb46 commit 0bae195Copy full SHA for 0bae195
mysql-test/suite.pm
@@ -56,15 +56,10 @@ sub skip_combinations {
56
sub ipv6_ok() {
57
use Socket;
58
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
59
- my $ipv6_works = false;
+ $!="";
60
# eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation <5.14
61
- eval {
62
- my $addr = sockaddr_in6($baseport, Socket::IN6ADDR_LOOPBACK) or return 0;
63
- die 'bind failed' unless bind $sock, $addr;
64
- close $sock;
65
- $ipv6_works = true;
66
- };
67
- return $@ eq "" && $ipv6_works;
+ eval { bind $sock, sockaddr_in6($::baseport, Socket::IN6ADDR_LOOPBACK) };
+ return $@ eq "" && $! eq ""
68
}
69
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
70
0 commit comments