summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/replace/libreplace_network.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/replace/libreplace_network.m4 b/lib/replace/libreplace_network.m4
index 6554a59d386..d8ed8a1d536 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -414,6 +414,14 @@ if (ret != 0) {
const char *es = gai_strerror(ret);
}
freeaddrinfo(ai);
+{
+ int val = 1;
+ #ifdef HAVE_LINUX_IPV6_V6ONLY_26
+ #define IPV6_V6ONLY 26
+ #endif
+ ret = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
+ (const void *)&val, sizeof(val));
+}
],[
libreplace_cv_HAVE_IPV6=yes
],[