summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2014-12-15 12:56:41 +0000
committerfhajny <fhajny@pkgsrc.org>2014-12-15 12:56:41 +0000
commit24fee2c20e6d6ced5aa598f392f58b221b1bc14b (patch)
treef579e06ab16a54cec0c3ff51cbe601ae4ba0a401 /net
parenta1ef324dcf835843d0fb6a89650cc4179034fb91 (diff)
downloadpkgsrc-24fee2c20e6d6ced5aa598f392f58b221b1bc14b.tar.gz
Do not use IP_PKTINFO on NetBSD. Fixes build on NetBSD 7.
Diffstat (limited to 'net')
-rw-r--r--net/powerdns/distinfo4
-rw-r--r--net/powerdns/patches/patch-pdns_misc.cc14
-rw-r--r--net/powerdns/patches/patch-pdns_nameserver.cc23
3 files changed, 40 insertions, 1 deletions
diff --git a/net/powerdns/distinfo b/net/powerdns/distinfo
index ad3161eb499..60e3a9d948c 100644
--- a/net/powerdns/distinfo
+++ b/net/powerdns/distinfo
@@ -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_dnsparser.hh) = d9480c40b97fb8c7d8f1dbbe1777c42ef270d9d1
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 --git a/net/powerdns/patches/patch-pdns_misc.cc b/net/powerdns/patches/patch-pdns_misc.cc
new file mode 100644
index 00000000000..fc1a77b6421
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_misc.cc
@@ -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 --git a/net/powerdns/patches/patch-pdns_nameserver.cc b/net/powerdns/patches/patch-pdns_nameserver.cc
new file mode 100644
index 00000000000..ce4e1f60982
--- /dev/null
+++ b/net/powerdns/patches/patch-pdns_nameserver.cc
@@ -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;