]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile without INET6.
authorRoy Marples <roy@marples.name>
Sat, 12 Aug 2017 08:17:23 +0000 (09:17 +0100)
committerRoy Marples <roy@marples.name>
Sat, 12 Aug 2017 08:17:23 +0000 (09:17 +0100)
src/dhcpcd.c
src/if-bsd.c
src/ipv6.h

index 6e8dba3335ff67dfc1ae4508a244c0423757212c..fe21612a2f99a41aca5aaa75d594ad5f4f61a15e 100644 (file)
@@ -649,10 +649,12 @@ dhcpcd_initstate2(struct interface *ifp, unsigned long long options)
        } else
                ifo = ifp->options;
 
+#ifdef INET6
        if (ifo->options & DHCPCD_IPV6 && ipv6_init(ifp->ctx) == -1) {
                logerr(__func__);
                ifo->options &= ~DHCPCD_IPV6;
        }
+#endif
 }
 
 static void
index 80878cce6b1a9eb3e9f9ebe6167482990312c3fd..62d661f191402099f17a666507211ea14845dec9 100644 (file)
@@ -437,7 +437,7 @@ if_copysa(struct sockaddr *dst, const struct sockaddr *src)
        assert(src != NULL);
 
        memcpy(dst, src, src->sa_len);
-#ifdef __KAME__
+#if defined(INET6) && defined(__KAME__)
        if (dst->sa_family == AF_INET6) {
                struct in6_addr *in6;
 
index 572612f6e3134ebc8ea9f401c7bb2ffe9012e128..4866aede28f6ffd44fd76db501c085b897de718f 100644 (file)
@@ -287,7 +287,6 @@ void ipv6_ctxfree(struct dhcpcd_ctx *);
 bool inet6_getroutes(struct dhcpcd_ctx *, struct rt_head *);
 
 #else
-#define ipv6_init(a) (NULL)
 #define ipv6_start(a) (-1)
 #define ipv6_startstatic(a)
 #define ipv6_staticdadcompleted(a) (0)