summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/atlocal.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 95f98f4dc..bdf5bd0ca 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -108,7 +108,12 @@ FreeBSD|NetBSD)
esac
# Check whether to run IPv6 tests.
-if perl -e 'use Socket; socket(FH, PF_INET6, SOCK_STREAM, 0) || exit 1;'; then
+if perl -e '
+ use Socket qw(PF_INET6 SOCK_STREAM pack_sockaddr_in6 IN6ADDR_LOOPBACK);
+
+ socket(S, PF_INET6, SOCK_STREAM, 0) || exit 1;
+ bind(S, pack_sockaddr_in6(0, IN6ADDR_LOOPBACK)) || exit 1;
+'; then
HAVE_IPV6=yes
else
HAVE_IPV6=no