mirror of
https://github.com/monero-project/monero.git
synced 2024-12-24 12:39:59 +00:00
Merge pull request #2702
f946bb7b
fixed an LMDB issue on OpenBSD (#2699) which leads to a crash in monerod (ston1th)
This commit is contained in:
commit
75ad92c82c
1 changed files with 6 additions and 0 deletions
|
@ -1123,6 +1123,12 @@ void BlockchainLMDB::open(const std::string& filename, const int db_flags)
|
||||||
|
|
||||||
m_folder = filename;
|
m_folder = filename;
|
||||||
|
|
||||||
|
#ifdef __OpenBSD__
|
||||||
|
if ((mdb_flags & MDB_WRITEMAP) == 0) {
|
||||||
|
MCLOG_RED(el::Level::Info, "global", "Running on OpenBSD: forcing WRITEMAP");
|
||||||
|
mdb_flags |= MDB_WRITEMAP;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
// set up lmdb environment
|
// set up lmdb environment
|
||||||
if ((result = mdb_env_create(&m_env)))
|
if ((result = mdb_env_create(&m_env)))
|
||||||
throw0(DB_ERROR(lmdb_error("Failed to create lmdb environment: ", result).c_str()));
|
throw0(DB_ERROR(lmdb_error("Failed to create lmdb environment: ", result).c_str()));
|
||||||
|
|
Loading…
Reference in a new issue