summaryrefslogtreecommitdiff
path: root/lib/tsocket
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsocket')
-rw-r--r--lib/tsocket/tsocket_bsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index c44ba4e714..1a7a4eed62 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -1248,7 +1248,7 @@ static int tdgram_bsd_dgram_socket(const struct tsocket_address *local,
bsds->fd = fd;
talloc_set_destructor(bsds, tdgram_bsd_destructor);
-#ifdef HAVE_IPV6
+#if defined(HAVE_IPV6) && defined(IPV6_V6ONLY)
if (do_ipv6only) {
int val = 1;
@@ -2089,7 +2089,7 @@ static struct tevent_req * tstream_bsd_connect_send(TALLOC_CTX *mem_ctx,
goto post;
}
-#ifdef HAVE_IPV6
+#if defined(HAVE_IPV6) && defined(IPV6_V6ONLY)
if (do_ipv6only) {
int val = 1;