summaryrefslogtreecommitdiff
path: root/mysql-test/suite.pm
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite.pm')
-rw-r--r--mysql-test/suite.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index 15615c46c81..40ad76a7f57 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -33,9 +33,10 @@ sub skip_combinations {
sub ipv6_ok() {
use Socket;
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
+ $!="";
# eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
- eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) };
- return $@ eq "";
+ eval { bind $sock, sockaddr_in6($::baseport, Socket::IN6ADDR_LOOPBACK) };
+ return $@ eq "" && $! eq ""
}
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();