tsocket: not all systems have IPV6_V6ONLY
authorAndrew Tridgell <tridge@samba.org>
Thu, 25 Mar 2010 05:42:19 +0000 (16:42 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 26 Mar 2010 05:50:48 +0000 (16:50 +1100)
lib/tsocket/tsocket_bsd.c

index c44ba4e714fe2735bd787003e4b468d918a0b850..1a7a4eed62cc8e897af6bdd5d6f74f228fe85df2 100644 (file)
@@ -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;