]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] an urgent care fix to build failure after #1614 with older boost.
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 27 Jan 2012 01:00:23 +0000 (01:00 +0000)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 27 Jan 2012 01:00:23 +0000 (01:00 +0000)
we should either/both consider revisiting the interface so we avoid the
issue as a result or require higher version of boost.  but for now this
should be okay.

src/lib/dns/rrset.h

index 0160fb50bebcbad9e165fec226cd2e5cbf86fad8..2066aaab5d1b2e0ed5fb73faef5ab58984b9d7f4 100644 (file)
@@ -701,6 +701,14 @@ public:
         rrsig_->addRdata(rdata);
     }
 
+    // Workaround for older versions of boost: some don't support implicit
+    // conversion from shared_ptr<X> to shared_ptr<const X>.  Note: we should
+    // revisit the interface of managing RRset signatures, at which point this
+    // problem may go away.
+    void addRRsig(const rdata::RdataPtr rdata) {
+        static_cast<rdata::ConstRdataPtr>(rdata);
+    }
+
     /// \brief Adds an RRSIG RRset to this RRset
     void addRRsig(const AbstractRRset& sigs) {
         RdataIteratorPtr it = sigs.getRdataIterator();
@@ -717,6 +725,9 @@ public:
 
     void addRRsig(ConstRRsetPtr sigs) { addRRsig(*sigs); }
 
+    // Another workaround for older boost (see above)
+    void addRRsig(RRsetPtr sigs) { addRRsig(*sigs); }
+
     /// \brief Clear the RRSIGs for this RRset
     void removeRRsig() { rrsig_ = RRsetPtr(); }