From 4da81fdbefb193c9b6fb6fe1db670b821ca1e419 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Thu, 24 Aug 2017 21:28:59 +0100 Subject: [PATCH] Fix build on Mac OS X --- .../implementations/encrypted/EncryptedBlockStore2.cpp | 2 ++ .../implementations/encrypted/EncryptedBlockStore2.h | 6 ++++++ .../versioncounting/VersionCountingBlockStore2.cpp | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/src/blockstore/implementations/encrypted/EncryptedBlockStore2.cpp b/src/blockstore/implementations/encrypted/EncryptedBlockStore2.cpp index f53d4aae..09ea249a 100644 --- a/src/blockstore/implementations/encrypted/EncryptedBlockStore2.cpp +++ b/src/blockstore/implementations/encrypted/EncryptedBlockStore2.cpp @@ -1 +1,3 @@ #include "EncryptedBlockStore2.h" + + diff --git a/src/blockstore/implementations/encrypted/EncryptedBlockStore2.h b/src/blockstore/implementations/encrypted/EncryptedBlockStore2.h index 263f46f8..1a306bdc 100644 --- a/src/blockstore/implementations/encrypted/EncryptedBlockStore2.h +++ b/src/blockstore/implementations/encrypted/EncryptedBlockStore2.h @@ -51,6 +51,12 @@ private: DISALLOW_COPY_AND_ASSIGN(EncryptedBlockStore2); }; +template +constexpr uint16_t EncryptedBlockStore2::FORMAT_VERSION_HEADER; + +template +constexpr unsigned int EncryptedBlockStore2::HEADER_LENGTH; + template inline EncryptedBlockStore2::EncryptedBlockStore2(cpputils::unique_ref baseBlockStore, const typename Cipher::EncryptionKey &encKey) : _baseBlockStore(std::move(baseBlockStore)), _encKey(encKey) { diff --git a/src/blockstore/implementations/versioncounting/VersionCountingBlockStore2.cpp b/src/blockstore/implementations/versioncounting/VersionCountingBlockStore2.cpp index c16fee12..182f9b23 100644 --- a/src/blockstore/implementations/versioncounting/VersionCountingBlockStore2.cpp +++ b/src/blockstore/implementations/versioncounting/VersionCountingBlockStore2.cpp @@ -12,6 +12,12 @@ using namespace cpputils::logging; namespace blockstore { namespace versioncounting { +constexpr uint16_t VersionCountingBlockStore2::FORMAT_VERSION_HEADER; +constexpr uint64_t VersionCountingBlockStore2::VERSION_ZERO; +constexpr unsigned int VersionCountingBlockStore2::CLIENTID_HEADER_OFFSET; +constexpr unsigned int VersionCountingBlockStore2::VERSION_HEADER_OFFSET; +constexpr unsigned int VersionCountingBlockStore2::HEADER_LENGTH; + Data VersionCountingBlockStore2::_prependHeaderToData(uint32_t myClientId, uint64_t version, const Data &data) { static_assert(HEADER_LENGTH == sizeof(FORMAT_VERSION_HEADER) + sizeof(myClientId) + sizeof(version), "Wrong header length"); Data result(data.size() + HEADER_LENGTH);