]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on OpenBSD-5.7
authorRoy Marples <roy@marples.name>
Thu, 19 Mar 2015 13:10:55 +0000 (13:10 +0000)
committerRoy Marples <roy@marples.name>
Thu, 19 Mar 2015 13:10:55 +0000 (13:10 +0000)
if-bsd.c

index 3c589fb5ccb92c3242c80f578b5c878847db943e..338c0135a24d8109d05080a05391afe8f2f8591e 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -1461,6 +1461,13 @@ set_ifxflags(const struct interface *ifp, int own)
        struct ifreq ifr;
        int s, flags;
 
+#ifndef IFXF_NOINET6
+       /* No point in removing the no inet6 flag if it doesn't
+        * exist and we're not owning inet6. */
+       if (! own)
+               return 0;
+#endif
+
        s = socket(PF_INET6, SOCK_DGRAM, 0);
        if (s == -1)
                return -1;
@@ -1470,7 +1477,9 @@ set_ifxflags(const struct interface *ifp, int own)
                return -1;
        }
        flags = ifr.ifr_flags;
+#ifdef IFXF_NOINET6
        flags &= ~IFXF_NOINET6;
+#endif
        if (own)
                flags &= ~IFXF_AUTOCONF6;
        if (ifr.ifr_flags != flags) {