From: Roy Marples Date: Sat, 12 Aug 2017 08:17:23 +0000 (+0100) Subject: Fix compile without INET6. X-Git-Tag: v7.0.0-rc2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d333c82681c9e991bf04f2dbd988bf6071c768db;p=thirdparty%2Fdhcpcd.git Fix compile without INET6. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 6e8dba33..fe21612a 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -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 diff --git a/src/if-bsd.c b/src/if-bsd.c index 80878cce..62d661f1 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -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; diff --git a/src/ipv6.h b/src/ipv6.h index 572612f6..4866aede 100644 --- a/src/ipv6.h +++ b/src/ipv6.h @@ -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)