diff --git a/src/lib/cc/tests/Makefile.am b/src/lib/cc/tests/Makefile.am index 476085582c..08b7f33a5a 100644 --- a/src/lib/cc/tests/Makefile.am +++ b/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 diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc index 8374c2142f..c19d5aea42 100644 --- a/src/lib/datasrc/memory_datasrc.cc +++ b/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 to +// function (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().