]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile
authorRoy Marples <roy@marples.name>
Tue, 20 Aug 2013 10:36:49 +0000 (10:36 +0000)
committerRoy Marples <roy@marples.name>
Tue, 20 Aug 2013 10:36:49 +0000 (10:36 +0000)
Don't warn about BSD kernels not reporting DAD if not building IPv6

ipv6.h
ipv6nd.c

diff --git a/ipv6.h b/ipv6.h
index 5a827af19395a37a16a85271610ecda97c188be9..2ce706abbc6cd9829699dd4125aa172fe49b1c5f 100644 (file)
--- a/ipv6.h
+++ b/ipv6.h
@@ -66,7 +66,7 @@
 #  endif
 #endif
 
-#ifdef LISTEN_DAD
+#if defined(LISTEN_DAD) && defined(INET6)
 #  warning kernel does not report DAD results to userland
 #  warning listening to duplicated addresses on the wire
 #endif
index dcab8b4d8450a01cb182e70e0a945b49fcaed128..38486b1259ec1395be8b3bbc6067c684b5fd2b1d 100644 (file)
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -280,7 +280,7 @@ ipv6nd_naopen(void)
        return sock;
 
 eexit:
-#ifdef LISTEN_DAD
+#ifdef IPV6_SEND_DAD
        close(unspec_sock);
        unspec_sock = -1;
 #endif