summaryrefslogtreecommitdiff
path: root/net/dnsdist
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2017-05-22 23:41:22 +0000
committerjoerg <joerg@pkgsrc.org>2017-05-22 23:41:22 +0000
commitc6cfb3e44acf910e0c03ebb104bee888c8d72445 (patch)
tree5f6a2bef655064784563120c5f5b144e04f526fc /net/dnsdist
parent68d2dae2596792a9c82d09cd543ce5080c8232f2 (diff)
downloadpkgsrc-c6cfb3e44acf910e0c03ebb104bee888c8d72445.tar.gz
Don't try to order null pointers.
Diffstat (limited to 'net/dnsdist')
-rw-r--r--net/dnsdist/distinfo3
-rw-r--r--net/dnsdist/patches/patch-ext_json11_json11.cpp30
2 files changed, 32 insertions, 1 deletions
diff --git a/net/dnsdist/distinfo b/net/dnsdist/distinfo
index 3a3b2b7e625..c3cb76070ef 100644
--- a/net/dnsdist/distinfo
+++ b/net/dnsdist/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2017/03/31 20:49:51 fhajny Exp $
+$NetBSD: distinfo,v 1.2 2017/05/22 23:41:22 joerg Exp $
SHA1 (dnsdist-1.1.0.tar.bz2) = 9b6372fc5f606ee83dac465e1dc9c824242f5905
RMD160 (dnsdist-1.1.0.tar.bz2) = 7724641b2be1c3611dd0b2c685cf6e8b7a365e67
@@ -7,5 +7,6 @@ Size (dnsdist-1.1.0.tar.bz2) = 874837 bytes
SHA1 (patch-dns.hh) = 13834e3d9f48b3095ce4912540c7d0d275c3a3a3
SHA1 (patch-dnsdist-console.cc) = 51fee0e89b648e0f9c2e6c0d9a6859ef2991a1b7
SHA1 (patch-dnsdist.cc) = 2b2bf569c134019dd8a5d4f3df104fdd16a47a31
+SHA1 (patch-ext_json11_json11.cpp) = 9fb12578d80103b8b92e984a483cbda98fd83db8
SHA1 (patch-iputils.hh) = 666fe81cc651b2c7e85164b8246283e301bcce1a
SHA1 (patch-qtype.hh) = 4551be1e303a31d34030c363849398923f5ff987
diff --git a/net/dnsdist/patches/patch-ext_json11_json11.cpp b/net/dnsdist/patches/patch-ext_json11_json11.cpp
new file mode 100644
index 00000000000..41dafd3ff37
--- /dev/null
+++ b/net/dnsdist/patches/patch-ext_json11_json11.cpp
@@ -0,0 +1,30 @@
+$NetBSD: patch-ext_json11_json11.cpp,v 1.1 2017/05/22 23:41:22 joerg Exp $
+
+Clang rejects ordering relations for nullptr, so introduce a template
+indirection.
+
+--- ext/json11/json11.cpp.orig 2016-12-29 12:45:46.000000000 +0000
++++ ext/json11/json11.cpp
+@@ -132,6 +132,13 @@ void Json::dump(string &out) const {
+ * Value wrappers
+ */
+
++template <typename T> bool json11_less(T a, T b) {
++ return a < b;
++}
++template <> bool json11_less(const std::nullptr_t a, const std::nullptr_t b) {
++ return false;
++}
++
+ template <Json::Type tag, typename T>
+ class Value : public JsonValue {
+ protected:
+@@ -150,7 +157,7 @@ protected:
+ return m_value == static_cast<const Value<tag, T> *>(other)->m_value;
+ }
+ bool less(const JsonValue * other) const override {
+- return m_value < static_cast<const Value<tag, T> *>(other)->m_value;
++ return json11_less(m_value, static_cast<const Value<tag, T> *>(other)->m_value);
+ }
+
+ const T m_value;