From: Roy Marples Date: Thu, 19 Mar 2015 13:10:55 +0000 (+0000) Subject: Fix compile on OpenBSD-5.7 X-Git-Tag: v6.8.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b12bda25edb97c442971fc7babadffce783304;p=thirdparty%2Fdhcpcd.git Fix compile on OpenBSD-5.7 --- diff --git a/if-bsd.c b/if-bsd.c index 3c589fb5..338c0135 100644 --- 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) {