]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on non NetBSD-8
authorRoy Marples <roy@marples.name>
Fri, 1 May 2015 20:08:57 +0000 (20:08 +0000)
committerRoy Marples <roy@marples.name>
Fri, 1 May 2015 20:08:57 +0000 (20:08 +0000)
if-bsd.c

index ac9b6ec96d388a9f7ffc9c836e531d1830ae64b3..53698f907f50189c1ccb3ec6089f5c986189749d 100644 (file)
--- 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