svn commit: r431820 - in head/dns/dnsdist: . files
Carlos J. Puga Medina
cpm at FreeBSD.org
Wed Jan 18 17:58:54 UTC 2017
Author: cpm
Date: Wed Jan 18 17:58:53 2017
New Revision: 431820
URL: https://svnweb.freebsd.org/changeset/ports/431820
Log:
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
Added:
head/dns/dnsdist/files/patch-ext_json11_json11.cpp (contents, props changed)
Modified:
head/dns/dnsdist/Makefile
Modified: head/dns/dnsdist/Makefile
==============================================================================
--- head/dns/dnsdist/Makefile Wed Jan 18 17:49:22 2017 (r431819)
+++ head/dns/dnsdist/Makefile Wed Jan 18 17:58:53 2017 (r431820)
@@ -3,6 +3,7 @@
PORTNAME= dnsdist
DISTVERSION= 1.1.0
+PORTREVISION= 1
CATEGORIES= dns net
MASTER_SITES= https://downloads.powerdns.com/releases/ \
LOCAL/cpm
Added: head/dns/dnsdist/files/patch-ext_json11_json11.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/dns/dnsdist/files/patch-ext_json11_json11.cpp Wed Jan 18 17:58:53 2017 (r431820)
@@ -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({}) {}
+ };
+
+ /* * * * * * * * * * * * * * * * * * * *
More information about the svn-ports-all
mailing list