From: Roy Marples Date: Sat, 7 Mar 2015 12:16:38 +0000 (+0000) Subject: Fix compile without INET6 and/or INET X-Git-Tag: v6.8.0~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e413d9c1f36cbcc10b6493961504ea9872ad2292;p=thirdparty%2Fdhcpcd.git Fix compile without INET6 and/or INET --- diff --git a/if-bsd.c b/if-bsd.c index 7f1d6720..805ad9cf 100644 --- a/if-bsd.c +++ b/if-bsd.c @@ -273,6 +273,7 @@ get_addrs(int type, char *cp, struct sockaddr **sa) } } +#if defined(INET) || defined(INET6) static struct interface * if_findsdl(struct dhcpcd_ctx *ctx, struct sockaddr_dl *sdl) { @@ -285,6 +286,7 @@ if_findsdl(struct dhcpcd_ctx *ctx, struct sockaddr_dl *sdl) } return NULL; } +#endif #ifdef INET const char *if_pfname = "Berkley Packet Filter"; diff --git a/if-options.c b/if-options.c index 78e2b949..412cee52 100644 --- a/if-options.c +++ b/if-options.c @@ -511,7 +511,7 @@ set_option_space(struct dhcpcd_ctx *ctx, #if !defined(INET) && !defined(INET6) /* Satisfy use */ - ctx = ctx; + ctx = NULL; #endif #ifdef INET6