pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/powerdns Always const_cast the cmsg use, at least ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a7c45ef2f0f6
branches: trunk
changeset: 378129:a7c45ef2f0f6
user: joerg <joerg%pkgsrc.org@localhost>
date: Sun Apr 01 20:28:21 2018 +0000
description:
Always const_cast the cmsg use, at least on NetBSD it will cast to void *
and that breaks otherwise.
diffstat:
net/powerdns/distinfo | 3 ++-
net/powerdns/patches/patch-pdns_iputils.cc | 30 ++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletions(-)
diffs (51 lines):
diff -r 36930f3acdd2 -r a7c45ef2f0f6 net/powerdns/distinfo
--- a/net/powerdns/distinfo Sun Apr 01 20:27:20 2018 +0000
+++ b/net/powerdns/distinfo Sun Apr 01 20:28:21 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.30 2018/02/19 12:59:40 fhajny Exp $
+$NetBSD: distinfo,v 1.31 2018/04/01 20:28:21 joerg Exp $
SHA1 (pdns-4.1.1.tar.bz2) = c70f03bb73170d21026f1c32d1f75007057cc34e
RMD160 (pdns-4.1.1.tar.bz2) = d87aae5010278b96803347c1c227f278430884bd
@@ -9,6 +9,7 @@
SHA1 (patch-m4_pdns__check__os.m4) = c7a8d91c519ae7ca0616dfc08fa04402fca950d0
SHA1 (patch-pdns_dns.hh) = 626eb4e29b7fcd82fbe056036c157c1e85fa49ca
SHA1 (patch-pdns_dnsscope.cc) = b289b750686b25041c3e291fb0d3d562beb36eaf
+SHA1 (patch-pdns_iputils.cc) = fbd3bb210216bb98c3cd73b702b6dea486c51dec
SHA1 (patch-pdns_iputils.hh) = 714277322ea721ea0439fc6aa0265bd290219e8b
SHA1 (patch-pdns_qtype.hh) = 0f8bca4c0cafea9a5257a08077fa42b4c52127f5
SHA1 (patch-pdns_version.cc) = be2035a37a554f64b8e6dad8f7faa112aba10f6c
diff -r 36930f3acdd2 -r a7c45ef2f0f6 net/powerdns/patches/patch-pdns_iputils.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/powerdns/patches/patch-pdns_iputils.cc Sun Apr 01 20:28:21 2018 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-pdns_iputils.cc,v 1.1 2018/04/01 20:28:21 joerg Exp $
+
+--- pdns/iputils.cc.orig 2018-04-01 17:24:16.523211468 +0000
++++ pdns/iputils.cc
+@@ -150,14 +150,14 @@ bool HarvestDestinationAddress(const str
+ for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL; cmsg = CMSG_NXTHDR(const_cast<struct msghdr*>(msgh), const_cast<struct cmsghdr*>(cmsg))) {
+ #if defined(IP_PKTINFO)
+ if ((cmsg->cmsg_level == IPPROTO_IP) && (cmsg->cmsg_type == IP_PKTINFO)) {
+- struct in_pktinfo *i = (struct in_pktinfo *) CMSG_DATA(cmsg);
++ struct in_pktinfo *i = (struct in_pktinfo *) CMSG_DATA(const_cast<struct cmsghdr *>(cmsg));
+ destination->sin4.sin_addr = i->ipi_addr;
+ destination->sin4.sin_family = AF_INET;
+ return true;
+ }
+ #elif defined(IP_RECVDSTADDR)
+ if ((cmsg->cmsg_level == IPPROTO_IP) && (cmsg->cmsg_type == IP_RECVDSTADDR)) {
+- struct in_addr *i = (struct in_addr *) CMSG_DATA(cmsg);
++ struct in_addr *i = (struct in_addr *) CMSG_DATA(const_cast<struct cmsghdr *>(cmsg));
+ destination->sin4.sin_addr = *i;
+ destination->sin4.sin_family = AF_INET;
+ return true;
+@@ -165,7 +165,7 @@ bool HarvestDestinationAddress(const str
+ #endif
+
+ if ((cmsg->cmsg_level == IPPROTO_IPV6) && (cmsg->cmsg_type == IPV6_PKTINFO)) {
+- struct in6_pktinfo *i = (struct in6_pktinfo *) CMSG_DATA(cmsg);
++ struct in6_pktinfo *i = (struct in6_pktinfo *) CMSG_DATA(const_cast<struct cmsghdr *>(cmsg));
+ destination->sin6.sin6_addr = i->ipi6_addr;
+ destination->sin4.sin_family = AF_INET6;
+ return true;
Home |
Main Index |
Thread Index |
Old Index