thin-provisioning-tools-0.6.3-build-fixes.patch 2.2 KB

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