summaryrefslogtreecommitdiff
blob: ae1148a1626feb1377010868bc5943a288ebb8fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff -purN a/Makefile.in b/Makefile.in
--- a/Makefile.in	2016-07-21 15:42:52.000000000 +0100
+++ b/Makefile.in	2016-10-28 22:45:54.292931031 +0100
@@ -108,7 +108,7 @@ CFLAGS?=@CFLAGS@
 CFLAGS+=-Wall
 CFLAGS+=@LFS_FLAGS@
 CXXFLAGS?=@CXXFLAGS@
-CXXFLAGS+=-Wall -fno-strict-aliasing -std=gnu++98
+CXXFLAGS+=-Wall -fno-strict-aliasing
 CXXFLAGS+=@CXXOPTIMISE_FLAG@
 CXXFLAGS+=@CXXDEBUG_FLAG@
 CXXFLAGS+=@CXX_STRERROR_FLAG@
diff -purN a/thin-provisioning/restore_emitter.cc b/thin-provisioning/restore_emitter.cc
--- a/thin-provisioning/restore_emitter.cc	2016-07-21 15:42:52.000000000 +0100
+++ b/thin-provisioning/restore_emitter.cc	2016-10-28 22:49:32.662189111 +0100
@@ -142,7 +142,7 @@ namespace {
 		bool device_exists(thin_dev_t dev) const {
 			uint64_t key[1] = {dev};
 			device_tree::maybe_value v = md_->details_->lookup(key);
-			return v;
+			return v.is_initialized();
 		}
 
 		metadata::ptr md_;
diff -purN a/thin-provisioning/thin_pool.cc b/thin-provisioning/thin_pool.cc
--- a/thin-provisioning/thin_pool.cc	2016-07-21 15:42:52.000000000 +0100
+++ b/thin-provisioning/thin_pool.cc	2016-10-28 22:50:26.999256645 +0100
@@ -232,7 +232,7 @@ bool
 thin_pool::device_exists(thin_dev_t dev) const
 {
 	uint64_t key[1] = {dev};
-	return md_->details_->lookup(key);
+	return md_->details_->lookup(key).is_initialized();
 }
 
 //----------------------------------------------------------------
diff -purN a/unit-tests/Makefile.in b/unit-tests/Makefile.in
--- a/unit-tests/Makefile.in	2016-07-21 15:42:52.000000000 +0100
+++ b/unit-tests/Makefile.in	2016-10-28 22:45:20.985893955 +0100
@@ -25,7 +25,7 @@ GMOCK_FLAGS=\
 	-Wno-unused-local-typedefs
 
 GMOCK_LIBS=\
-	-Llib -lpdata -lgmock -lpthread -laio
+	-Llib -lpdata -lgmock -lpthread -laio -lgtest
 
 GMOCK_DEPS=\
 	$(wildcard $(GMOCK_DIR)/include/*.h) \
@@ -80,7 +80,7 @@ TEST_OBJECTS=$(subst .cc,.gmo,$(TEST_SOU
 	sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*.d; \
 	$(RM) $*.$$$$
 
-unit-tests/unit_tests: $(TEST_OBJECTS) lib/libgmock.a lib/libpdata.a
+unit-tests/unit_tests: $(TEST_OBJECTS)  lib/libpdata.a
 	@echo "    [LD]  $<"
 	$(V)g++ $(CXXFLAGS) $(LDFLAGS) -o $@ $(TEST_OBJECTS) $(LIBS) $(GMOCK_LIBS) $(LIBEXPAT)