From: Pieter Lexis Date: Wed, 29 Apr 2015 11:19:51 +0000 (+0200) Subject: Fix compilation problems for auth on old linux versions X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~86^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=199f29bf195c83ff8bdd59dd982401d81069dc91;p=thirdparty%2Fpdns.git Fix compilation problems for auth on old linux versions --- diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index cc5c47bf84..a844766c45 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -217,7 +217,9 @@ void UDPNameserver::bindIPv6() if(IsAnyAddress(locala)) { setsockopt(s, IPPROTO_IP, GEN_IP_PKTINFO, &one, sizeof(one)); // linux supports this, so why not - might fail on other systems +#ifdef IPV6_RECVPKTINFO setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one)); +#endif setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one)); // if this fails, we report an error in tcpreceiver too }