diff options
author | cpm <cpm@FreeBSD.org> | 2017-01-19 01:58:53 +0800 |
---|---|---|
committer | cpm <cpm@FreeBSD.org> | 2017-01-19 01:58:53 +0800 |
commit | 8593f069729a414552c8972dcf3c6c9536ebd34d (patch) | |
tree | 6c0370b1b86add9fb2d100f792487ed98f1312f4 /dns/dnsdist | |
parent | 7ecb676fcf0ec0813938bed532bc975cae5014a1 (diff) | |
download | freebsd-ports-gnome-8593f069729a414552c8972dcf3c6c9536ebd34d.tar.gz freebsd-ports-gnome-8593f069729a414552c8972dcf3c6c9536ebd34d.tar.zst freebsd-ports-gnome-8593f069729a414552c8972dcf3c6c9536ebd34d.zip |
dns/dnsdist: unbreak build with clang 4.0
ext/json11/json11.cpp:153:24: error: invalid operands to binary expression
('nullptr_t' and 'nullptr_t')
return m_value < static_cast<const Value<tag, T> *>(other)->m_value;
~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/json11/json11.cpp:209:5: note: in instantiation of member function
'json11::Value<json11::Json::Type::NUL, nullptr_t>::less' requested here
JsonNull() : Value(nullptr) {}
^
PR: 216069
Reported by: jbeich
Obtained from: upstream
MFH: 2017Q1
Diffstat (limited to 'dns/dnsdist')
-rw-r--r-- | dns/dnsdist/Makefile | 1 | ||||
-rw-r--r-- | dns/dnsdist/files/patch-ext_json11_json11.cpp | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/dns/dnsdist/Makefile b/dns/dnsdist/Makefile index 575339937a0a..d925952ce4e9 100644 --- a/dns/dnsdist/Makefile +++ b/dns/dnsdist/Makefile @@ -3,6 +3,7 @@ PORTNAME= dnsdist DISTVERSION= 1.1.0 +PORTREVISION= 1 CATEGORIES= dns net MASTER_SITES= https://downloads.powerdns.com/releases/ \ LOCAL/cpm diff --git a/dns/dnsdist/files/patch-ext_json11_json11.cpp b/dns/dnsdist/files/patch-ext_json11_json11.cpp new file mode 100644 index 000000000000..600308eaa51b --- /dev/null +++ b/dns/dnsdist/files/patch-ext_json11_json11.cpp @@ -0,0 +1,36 @@ +--- ext/json11/json11.cpp.orig 2017-01-18 02:13:48 UTC ++++ ext/json11/json11.cpp +@@ -37,11 +37,20 @@ using std::make_shared; + using std::initializer_list; + using std::move; + ++/* Helper for representing null - just a do-nothing struct, plus comparison ++ * operators so the helpers in JsonValue work. We can't use nullptr_t because ++ * it may not be orderable. ++*/ ++struct NullStruct { ++ bool operator==(NullStruct) const { return true; } ++ bool operator<(NullStruct) const { return false; } ++}; ++ + /* * * * * * * * * * * * * * * * * * * * + * Serialization + */ + +-static void dump(std::nullptr_t, string &out) { ++static void dump(NullStruct, string &out) { + out += "null"; + } + +@@ -204,9 +213,9 @@ public: + explicit JsonObject(Json::object &&value) : Value(move(value)) {} + }; + +-class JsonNull final : public Value<Json::NUL, std::nullptr_t> { ++class JsonNull final : public Value<Json::NUL, NullStruct> { + public: +- JsonNull() : Value(nullptr) {} ++ JsonNull() : Value({}) {} + }; + + /* * * * * * * * * * * * * * * * * * * * |