From: Roy Marples Date: Fri, 1 May 2015 20:08:57 +0000 (+0000) Subject: Fix compile on non NetBSD-8 X-Git-Tag: v6.8.2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaeb323e09ea2d5dc4b03bb930f535cad01e99ae;p=thirdparty%2Fdhcpcd.git Fix compile on non NetBSD-8 --- diff --git a/if-bsd.c b/if-bsd.c index ac9b6ec9..53698f90 100644 --- a/if-bsd.c +++ b/if-bsd.c @@ -714,10 +714,10 @@ if_initrt(struct interface *ifp) return 0; } +#ifdef SIOCGIFAFLAG_IN int if_addrflags(const struct in_addr *addr, const struct interface *ifp) { -#ifdef SIOCGIFAFLAG_IN int s, flags; struct ifreq ifr; struct sockaddr_in *sin; @@ -735,12 +735,17 @@ if_addrflags(const struct in_addr *addr, const struct interface *ifp) close(s); } return flags; +} #else +int +if_addrflags(__unused const struct in_addr *addr, + __unused const struct interface *ifp) +{ errno = ENOTSUP; return 0; -#endif } #endif +#endif /* INET */ #ifdef INET6 static void