diff options
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 6 | ||||
-rw-r--r-- | src/version.cmake | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index c88f79964..371d84c31 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -110,8 +110,14 @@ private: int compare_uint64(const MDB_val *a, const MDB_val *b) { +#ifdef MISALIGNED_OK const uint64_t va = *(const uint64_t*)a->mv_data; const uint64_t vb = *(const uint64_t*)b->mv_data; +#else + uint64_t va, vb; + memcpy(&va, a->mv_data, sizeof(uint64_t)); + memcpy(&vb, b->mv_data, sizeof(uint64_t)); +#endif if (va < vb) return -1; else if (va == vb) return 0; else return 1; diff --git a/src/version.cmake b/src/version.cmake index 4cbaa58e2..8c56b392c 100644 --- a/src/version.cmake +++ b/src/version.cmake @@ -72,7 +72,7 @@ else() message(STATUS "You are building a tagged release") set(VERSIONTAG "release") else() - message(STATUS "You are ahead or behind of a tagged release") + message(STATUS "You are ahead of or behind a tagged release") set(VERSIONTAG "${COMMIT}") endif() endif() |