]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix compilation issues on ancient linux versions 2474/head
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:13:43 +0000 (13:13 +0200)
pdns/pdns_recursor.cc

index 23fca87bed28ce99777ea8b5a2e8d8217fc15039..387139d55e9c9975ec3d7e3687babd6ce3c9e98f 100644 (file)
@@ -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<<Logger::Error<<"Failed to set IPv6 socket to IPv6 only, continuing anyhow: "<<strerror(errno)<<endl;
       }