From: Pieter Lexis Date: Wed, 29 Apr 2015 11:13:43 +0000 (+0200) Subject: Fix compilation issues on ancient linux versions X-Git-Tag: rec-3.7.3~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2474%2Fhead;p=thirdparty%2Fpdns.git Fix compilation issues on ancient linux versions --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 23fca87bed..387139d55e 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1181,7 +1181,9 @@ void makeUDPServerSockets() if(IsAnyAddress(sin)) { int one=1; setsockopt(fd, IPPROTO_IP, GEN_IP_PKTINFO, &one, sizeof(one)); // linux supports this, so why not - might fail on other systems +#ifdef IPV6_RECVPKTINFO setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &one, sizeof(one)); +#endif if(sin.sin6.sin6_family == AF_INET6 && setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one)) < 0) { L<