pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/powerdns Do not use IP_PKTINFO on NetBSD. Fixes bu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d963c34b13c1
branches:  trunk
changeset: 643381:d963c34b13c1
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Mon Dec 15 12:56:41 2014 +0000

description:
Do not use IP_PKTINFO on NetBSD. Fixes build on NetBSD 7.

diffstat:

 net/powerdns/distinfo                         |   4 +++-
 net/powerdns/patches/patch-pdns_misc.cc       |  14 ++++++++++++++
 net/powerdns/patches/patch-pdns_nameserver.cc |  23 +++++++++++++++++++++++
 3 files changed, 40 insertions(+), 1 deletions(-)

diffs (63 lines):

diff -r b947100597c1 -r d963c34b13c1 net/powerdns/distinfo
--- a/net/powerdns/distinfo     Mon Dec 15 12:31:09 2014 +0000
+++ b/net/powerdns/distinfo     Mon Dec 15 12:56:41 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2014/12/10 14:50:08 fhajny Exp $
+$NetBSD: distinfo,v 1.15 2014/12/15 12:56:41 fhajny Exp $
 
 SHA1 (pdns-3.4.1.tar.bz2) = e4d807b4dc27ef130a49e0efaf82a74cb66f5b11
 RMD160 (pdns-3.4.1.tar.bz2) = fe9df921ac82db834bc011c7c20ad9b436c70cec
@@ -17,6 +17,8 @@
 SHA1 (patch-pdns_dnsscope.cc) = cc38014e1eb20ed3c65b59714e2725a8283f6391
 SHA1 (patch-pdns_dynloader.cc) = 6ef7957917936f077307a4b6c79afe5a4a6ef7c7
 SHA1 (patch-pdns_htimer.cc) = 43eb784a58dcad9b3cedca4a6aeae777e33bd2f9
+SHA1 (patch-pdns_misc.cc) = 989bd75074f6349b7e0720a490ff99a4af558f6e
+SHA1 (patch-pdns_nameserver.cc) = 0b6b888edc0656d9428dda760b4891c0c19f9e47
 SHA1 (patch-pdns_pdns_recursor.cc) = df9465d337fceb93caaff7ffc32d17681a8fe77d
 SHA1 (patch-pdns_receiver.cc) = 4411bfeccb2814550b834ddabee930918631c666
 SHA1 (patch-pdns_recursor__cache.cc) = a4c63c20a3e58d996a631c8a7754b8afb45cdb86
diff -r b947100597c1 -r d963c34b13c1 net/powerdns/patches/patch-pdns_misc.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/powerdns/patches/patch-pdns_misc.cc   Mon Dec 15 12:56:41 2014 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-pdns_misc.cc,v 1.1 2014/12/15 12:56:41 fhajny Exp $
+
+Do not use IP_PKTINFO on NetBSD.
+--- pdns/misc.cc.orig  2014-10-30 10:18:22.000000000 +0000
++++ pdns/misc.cc
+@@ -802,7 +802,7 @@ void addCMsgSrcAddr(struct msghdr* msgh,
+     msgh->msg_controllen = cmsg->cmsg_len; // makes valgrind happy and is slightly better style
+   }
+   else {
+-#ifdef IP_PKTINFO
++#if defined(IP_PKTINFO) && !defined(__NetBSD__)
+     struct in_pktinfo *pkt;
+ 
+     msgh->msg_control = cmsgbuf;
diff -r b947100597c1 -r d963c34b13c1 net/powerdns/patches/patch-pdns_nameserver.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/powerdns/patches/patch-pdns_nameserver.cc     Mon Dec 15 12:56:41 2014 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-pdns_nameserver.cc,v 1.3 2014/12/15 12:56:41 fhajny Exp $
+
+Do not use IP_PKTINFO on NetBSD.
+--- pdns/nameserver.cc.orig    2014-10-30 10:18:22.000000000 +0000
++++ pdns/nameserver.cc
+@@ -81,7 +81,7 @@ extern StatBag S;
+     The main() of PowerDNS can be found in receiver.cc - start reading there for further insights into the operation of the nameserver
+ */
+ 
+-#if defined(IP_PKTINFO)
++#if defined(IP_PKTINFO) || !defined(__NetBSD__)
+   #define GEN_IP_PKTINFO IP_PKTINFO
+ #elif defined(IP_RECVDSTADDR)
+   #define GEN_IP_PKTINFO IP_RECVDSTADDR 
+@@ -337,7 +337,7 @@ static bool HarvestDestinationAddress(st
+   memset(destination, 0, sizeof(*destination));
+   struct cmsghdr *cmsg;
+   for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(msgh,cmsg)) {
+-#if defined(IP_PKTINFO)
++#if defined(IP_PKTINFO) || !defined(__NetBSD__)
+      if ((cmsg->cmsg_level == IPPROTO_IP) && (cmsg->cmsg_type == IP_PKTINFO)) {
+         struct in_pktinfo *i = (struct in_pktinfo *) CMSG_DATA(cmsg);
+         destination->sin4.sin_addr = i->ipi_addr;



Home | Main Index | Thread Index | Old Index