Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2017 02:57:27 +0000 (UTC)
From:      "Carlos J. Puga Medina" <cpm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r431835 - in branches/2017Q1/dns/dnsdist: . files
Message-ID:  <201701190257.v0J2vRgx081495@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cpm
Date: Thu Jan 19 02:57:26 2017
New Revision: 431835
URL: https://svnweb.freebsd.org/changeset/ports/431835

Log:
  MFH: r431820
  
  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
  
  Approved by:	ports-secteam (blanket)

Added:
  branches/2017Q1/dns/dnsdist/files/patch-ext_json11_json11.cpp
     - copied unchanged from r431820, head/dns/dnsdist/files/patch-ext_json11_json11.cpp
Modified:
  branches/2017Q1/dns/dnsdist/Makefile
Directory Properties:
  branches/2017Q1/   (props changed)

Modified: branches/2017Q1/dns/dnsdist/Makefile
==============================================================================
--- branches/2017Q1/dns/dnsdist/Makefile	Thu Jan 19 02:50:46 2017	(r431834)
+++ branches/2017Q1/dns/dnsdist/Makefile	Thu Jan 19 02:57:26 2017	(r431835)
@@ -4,6 +4,7 @@
 PORTNAME=	dnsdist
 DISTVERSION=	1.0.0
 PORTREVISION=	4
+PORTREVISION=	1
 CATEGORIES=	dns net
 MASTER_SITES=	https://downloads.powerdns.com/releases/ \
 		LOCAL/cpm

Copied: branches/2017Q1/dns/dnsdist/files/patch-ext_json11_json11.cpp (from r431820, head/dns/dnsdist/files/patch-ext_json11_json11.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2017Q1/dns/dnsdist/files/patch-ext_json11_json11.cpp	Thu Jan 19 02:57:26 2017	(r431835, copy of r431820, head/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({}) {}
+ };
+ 
+ /* * * * * * * * * * * * * * * * * * * *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701190257.v0J2vRgx081495>