summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-05 13:58:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-05 13:58:33 +0300
commit92d38f1424b4ecc7f4792915799c8922a270baac (patch)
treec6e37d693d5fbbd133851e78635329407b17a38c
parent3f8d7daca60c27e3e23c3e1b54d44cd2c25a053b (diff)
exclusive flag should be passed into mdbx_mmap() call
-rw-r--r--plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c b/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c
index e8bdc0085e..042d6079d4 100644
--- a/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c
+++ b/plugins/Dbx_mdbx/src/libmdbx/src/mdbx.c
@@ -5674,7 +5674,7 @@ static int __cold mdbx_setup_lck(MDBX_env *env, char *lck_pathname,
}
env->me_maxreaders = (unsigned)maxreaders;
- err = mdbx_mmap(MDBX_WRITEMAP, &env->me_lck_mmap, (size_t)size, (size_t)size);
+ err = mdbx_mmap((env->me_flags & MDBX_EXCLUSIVE) | MDBX_WRITEMAP, &env->me_lck_mmap, (size_t)size, (size_t)size);
if (unlikely(err != MDBX_SUCCESS))
return err;