mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#7715 always set filesize for WRITEMAP
This commit is contained in:
parent
9f7ae8925f
commit
2520247ba1
@ -3272,7 +3272,7 @@ mdb_env_map(MDB_env *env, void *addr, int newsize)
|
||||
int prot = PROT_READ;
|
||||
if (flags & MDB_WRITEMAP) {
|
||||
prot |= PROT_WRITE;
|
||||
if (newsize && ftruncate(env->me_fd, env->me_mapsize) < 0)
|
||||
if (ftruncate(env->me_fd, env->me_mapsize) < 0)
|
||||
return ErrCode();
|
||||
}
|
||||
env->me_map = mmap(addr, env->me_mapsize, prot, MAP_SHARED,
|
||||
|
Loading…
Reference in New Issue
Block a user