Browse Source

[master]Merge branch 'master' of ssh://git.bind10.isc.org//var/bind10/git/bind10

Jeremy C. Reed 13 years ago
parent
commit
d8b8e46b85
2 changed files with 10 additions and 4 deletions
  1. 5 2
      src/lib/cc/tests/Makefile.am
  2. 5 2
      src/lib/datasrc/memory_datasrc.cc

+ 5 - 2
src/lib/cc/tests/Makefile.am

@@ -24,11 +24,14 @@ run_unittests_SOURCES = data_unittests.cc session_unittests.cc run_unittests.cc
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
 
-run_unittests_LDADD = $(GTEST_LDADD)
-run_unittests_LDADD +=  $(top_builddir)/src/lib/cc/libcc.la
+# We need to put our libs first, in case gtest (or any dependency, really)
+# is installed in the same location as a different version of bind10
+# Otherwise the linker may not use the source tree libs 
+run_unittests_LDADD =  $(top_builddir)/src/lib/cc/libcc.la
 run_unittests_LDADD +=  $(top_builddir)/src/lib/log/liblog.la
 run_unittests_LDADD +=  $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
 run_unittests_LDADD +=  $(top_builddir)/src/lib/exceptions/libexceptions.la
+run_unittests_LDADD += $(GTEST_LDADD)
 
 endif
 

+ 5 - 2
src/lib/datasrc/memory_datasrc.cc

@@ -1603,12 +1603,15 @@ InMemoryZoneFinder::InMemoryZoneFinderImpl::load(
 
 namespace {
 // A wrapper for dns::masterLoad used by load() below.  Essentially it
-// converts the two callback types.
+// converts the two callback types.  Note the mostly redundant wrapper of
+// boost::bind.  It converts function<void(ConstRRsetPtr)> to
+// function<void(RRsetPtr)> (masterLoad() expects the latter).  SunStudio
+// doesn't seem to do this conversion if we just pass 'callback'.
 void
 masterLoadWrapper(const char* const filename, const Name& origin,
                   const RRClass& zone_class, LoadCallback callback)
 {
-    masterLoad(filename, origin, zone_class, callback);
+    masterLoad(filename, origin, zone_class, boost::bind(callback, _1));
 }
 
 // The installer called from Impl::load() for the iterator version of load().