Fix build on Mac OS X

This commit is contained in:
Sebastian Messmer 2017-08-24 21:28:59 +01:00
parent fc21b0882a
commit 4da81fdbef
3 changed files with 14 additions and 0 deletions

View File

@ -1 +1,3 @@
#include "EncryptedBlockStore2.h"

View File

@ -51,6 +51,12 @@ private:
DISALLOW_COPY_AND_ASSIGN(EncryptedBlockStore2);
};
template<class Cipher>
constexpr uint16_t EncryptedBlockStore2<Cipher>::FORMAT_VERSION_HEADER;
template<class Cipher>
constexpr unsigned int EncryptedBlockStore2<Cipher>::HEADER_LENGTH;
template<class Cipher>
inline EncryptedBlockStore2<Cipher>::EncryptedBlockStore2(cpputils::unique_ref<BlockStore2> baseBlockStore, const typename Cipher::EncryptionKey &encKey)
: _baseBlockStore(std::move(baseBlockStore)), _encKey(encKey) {

View File

@ -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);