Browse Source

[master] an urgent care fix to build failure after #1614 with older boost.
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.

JINMEI Tatuya 13 years ago
parent
commit
2ee6320472
1 changed files with 11 additions and 0 deletions
  1. 11 0
      src/lib/dns/rrset.h

+ 11 - 0
src/lib/dns/rrset.h

@@ -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(); }