]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix compilation issues on ancient linux versions
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 29 Apr 2015 11:13:43 +0000 (13:13 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 29 Apr 2015 11:18:13 +0000 (13:18 +0200)
pdns/pdns_recursor.cc

index 32f0a2e5f00cf5395eb09e0bef0f7add0774ba9a..7ae2b4080123a0b6a2bc40f124451c875147f70a 100644 (file)
@@ -1187,7 +1187,9 @@ void makeUDPServerSockets()
 
     if(IsAnyAddress(sin)) {
       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<<Logger::Error<<"Failed to set IPv6 socket to IPv6 only, continuing anyhow: "<<strerror(errno)<<endl;
       }