diff options
author | fhajny <fhajny@pkgsrc.org> | 2018-08-08 15:39:55 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2018-08-08 15:39:55 +0000 |
commit | c66e3ef87b21ca496888438b814edf72f567361b (patch) | |
tree | e7d2a5849679bc1cde28f19ede3e67387c46edf7 /net/dnsdist | |
parent | 6014793d963b3381ad0bb5e7e62fd8a190ddc7ce (diff) | |
download | pkgsrc-c66e3ef87b21ca496888438b814edf72f567361b.tar.gz |
net/dnsdist: Fix build on SunOS, clean up args, disable optional SNMP.
Diffstat (limited to 'net/dnsdist')
-rw-r--r-- | net/dnsdist/Makefile | 5 | ||||
-rw-r--r-- | net/dnsdist/distinfo | 7 | ||||
-rw-r--r-- | net/dnsdist/patches/patch-devpollmplexer.cc | 14 | ||||
-rw-r--r-- | net/dnsdist/patches/patch-dnsdist.cc | 15 | ||||
-rw-r--r-- | net/dnsdist/patches/patch-iputils.hh | 6 | ||||
-rw-r--r-- | net/dnsdist/patches/patch-portsmplexer.cc | 53 |
6 files changed, 92 insertions, 8 deletions
diff --git a/net/dnsdist/Makefile b/net/dnsdist/Makefile index ffe4388244c..b406b9625cc 100644 --- a/net/dnsdist/Makefile +++ b/net/dnsdist/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2018/08/04 21:40:53 minskim Exp $ +# $NetBSD: Makefile,v 1.8 2018/08/08 15:39:55 fhajny Exp $ DISTNAME= dnsdist-1.3.2 CATEGORIES= net @@ -30,8 +30,9 @@ CONF_FILES+= share/examples/dnsdist/dnsdist.conf \ CONFIGURE_ARGS+= --enable-dnscrypt CONFIGURE_ARGS+= --enable-libsodium -CONFIGURE_ARGS+= --enable-protobuf CONFIGURE_ARGS+= --enable-re2 +CONFIGURE_ARGS+= --with-protobuf +CONFIGURE_ARGS+= --without-net-snmp CONFIGURE_ENV+= LIBEDIT_CFLAGS="-I${BUILDLINK_PREFIX.libedit}/include" CONFIGURE_ENV+= LIBEDIT_LIBS="-L${BUILDLINK_PREFIX.libedit}/lib -ledit" diff --git a/net/dnsdist/distinfo b/net/dnsdist/distinfo index 8d716ca9a72..fa24b9590de 100644 --- a/net/dnsdist/distinfo +++ b/net/dnsdist/distinfo @@ -1,9 +1,12 @@ -$NetBSD: distinfo,v 1.5 2018/08/04 21:40:53 minskim Exp $ +$NetBSD: distinfo,v 1.6 2018/08/08 15:39:55 fhajny Exp $ SHA1 (dnsdist-1.3.2.tar.bz2) = 6934250d90bb5de4a723cad3572ad2225be9211e RMD160 (dnsdist-1.3.2.tar.bz2) = 4b19dc9a1e6ba008a10be136385d1a297dbb1f87 SHA512 (dnsdist-1.3.2.tar.bz2) = af7c360d6a5255bc9588622747b8939d30669e2d7d749275b30a9be8cf306a92768327057a93bfa901c44ac8a7572c9bb801a7f6ceca6d736f3e9c71f80f5726 Size (dnsdist-1.3.2.tar.bz2) = 918200 bytes +SHA1 (patch-devpollmplexer.cc) = f942ab6fc962496ac8d8e02c95fc4e0bf41d2f06 +SHA1 (patch-dnsdist.cc) = f79f73f6932bf88d25787d26c96da6556343b1ed SHA1 (patch-ext_json11_json11.cpp) = 9fb12578d80103b8b92e984a483cbda98fd83db8 -SHA1 (patch-iputils.hh) = 78ffc93b3062d18a02a9ea67e4c6d58d8df7bdbb +SHA1 (patch-iputils.hh) = 09207cd894162d634cd832f12209e38a0c253624 +SHA1 (patch-portsmplexer.cc) = 9f1b0dc40d0baaa0bf7297d0c4c783abffb16c33 SHA1 (patch-qtype.hh) = 4551be1e303a31d34030c363849398923f5ff987 diff --git a/net/dnsdist/patches/patch-devpollmplexer.cc b/net/dnsdist/patches/patch-devpollmplexer.cc new file mode 100644 index 00000000000..22fe4fb0800 --- /dev/null +++ b/net/dnsdist/patches/patch-devpollmplexer.cc @@ -0,0 +1,14 @@ +$NetBSD: patch-devpollmplexer.cc,v 1.1 2018/08/08 15:39:55 fhajny Exp $ + +This include is not distributed anymore. + +--- devpollmplexer.cc.orig 2018-07-10 12:43:20.000000000 +0000 ++++ devpollmplexer.cc +@@ -33,7 +33,6 @@ + #include <iostream> + #include <unistd.h> + #include "misc.hh" +-#include "syncres.hh" + + #include "namespaces.hh" + diff --git a/net/dnsdist/patches/patch-dnsdist.cc b/net/dnsdist/patches/patch-dnsdist.cc new file mode 100644 index 00000000000..f1d9572e298 --- /dev/null +++ b/net/dnsdist/patches/patch-dnsdist.cc @@ -0,0 +1,15 @@ +$NetBSD: patch-dnsdist.cc,v 1.3 2018/08/08 15:39:55 fhajny Exp $ + +Bring arg in sync with the code. + +--- dnsdist.cc.orig 2018-07-10 12:43:20.000000000 +0000 ++++ dnsdist.cc +@@ -2523,7 +2523,7 @@ try + #ifdef SO_REUSEPORT + SSetsockopt(cs->tcpFD, SOL_SOCKET, SO_REUSEPORT, 1); + #else +- warnlog("SO_REUSEPORT has been configured on local address '%s' but is not supported", cs.local.toStringWithPort()); ++ warnlog("SO_REUSEPORT has been configured on local address '%s' but is not supported", cs->local.toStringWithPort()); + #endif + } + if(cs->local.sin4.sin_family == AF_INET6) { diff --git a/net/dnsdist/patches/patch-iputils.hh b/net/dnsdist/patches/patch-iputils.hh index b35857b7c1a..6eebd0406ff 100644 --- a/net/dnsdist/patches/patch-iputils.hh +++ b/net/dnsdist/patches/patch-iputils.hh @@ -1,8 +1,6 @@ -$NetBSD: patch-iputils.hh,v 1.2 2017/08/22 17:00:35 fhajny Exp $ +$NetBSD: patch-iputils.hh,v 1.3 2018/08/08 15:39:55 fhajny Exp $ -- Do not use IP_PKTINFO on NetBSD, the structure is not as expected. -- Backport fix for SunOS segfault problem, see: - https://github.com/PowerDNS/pdns/pull/4877 +Do not use IP_PKTINFO on NetBSD, the structure is not as expected. --- iputils.hh.orig 2017-01-17 08:43:49.000000000 +0000 +++ iputils.hh diff --git a/net/dnsdist/patches/patch-portsmplexer.cc b/net/dnsdist/patches/patch-portsmplexer.cc new file mode 100644 index 00000000000..fdd6614fe9f --- /dev/null +++ b/net/dnsdist/patches/patch-portsmplexer.cc @@ -0,0 +1,53 @@ +$NetBSD: patch-portsmplexer.cc,v 1.1 2018/08/08 15:39:55 fhajny Exp $ + +Fix stale code and add missing getAvailableFDs() implementation. + +--- portsmplexer.cc.orig 2018-07-10 12:43:20.000000000 +0000 ++++ portsmplexer.cc +@@ -24,10 +24,11 @@ public: + } + + virtual int run(struct timeval* tv, int timeout=500); ++ virtual void getAvailableFDs(std::vector<int>& fds, int timeout) override; + + virtual void addFD(callbackmap_t& cbmap, int fd, callbackfunc_t toDo, const boost::any& parameter); + virtual void removeFD(callbackmap_t& cbmap, int fd); +- string getName() ++ string getName() const override + { + return "solaris completion ports"; + } +@@ -78,6 +79,22 @@ void PortsFDMultiplexer::removeFD(callba + throw FDMultiplexerException("Removing fd from port set: "+stringerror()); + } + ++void PortsFDMultiplexer::getAvailableFDs(std::vector<int>& fds, int timeout) ++{ ++ struct timespec timeoutspec; ++ timeoutspec.tv_sec = timeout / 1000; ++ timeoutspec.tv_nsec = (timeout % 1000) * 1000000; ++ unsigned int numevents=1; ++ int ret= port_getn(d_portfd, d_pevents.get(), min(PORT_MAX_LIST, s_maxevents), &numevents, &timeoutspec); ++ ++ if(ret < 0 && errno!=EINTR) ++ throw FDMultiplexerException("ports returned error: "+stringerror()); ++ ++ for(int n=0; n < ret; ++n) { ++ fds.push_back(d_pevents[n].portev_object); ++ } ++} ++ + int PortsFDMultiplexer::run(struct timeval* now, int timeout) + { + if(d_inrun) { +@@ -85,8 +102,8 @@ int PortsFDMultiplexer::run(struct timev + } + + struct timespec timeoutspec; +- timeoutspec.tv_sec = time / 1000; +- timeoutspec.tv_nsec = (time % 1000) * 1000000; ++ timeoutspec.tv_sec = timeout / 1000; ++ timeoutspec.tv_nsec = (timeout % 1000) * 1000000; + unsigned int numevents=1; + int ret= port_getn(d_portfd, d_pevents.get(), min(PORT_MAX_LIST, s_maxevents), &numevents, &timeoutspec); + |