mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:58:21 +08:00
mdbx: fix posix mdbx_mmap().
This commit is contained in:
parent
fcb63130d6
commit
0b400c5dd0
@ -599,7 +599,7 @@ int mdbx_mmap(void **address, size_t length, int rw, mdbx_filehandle_t fd) {
|
|||||||
CloseHandle(h);
|
CloseHandle(h);
|
||||||
return rc;
|
return rc;
|
||||||
#else
|
#else
|
||||||
*address = mmap(address, length, rw ? PROT_READ | PROT_WRITE : PROT_READ,
|
*address = mmap(NULL, length, rw ? PROT_READ | PROT_WRITE : PROT_READ,
|
||||||
MAP_SHARED, fd, 0);
|
MAP_SHARED, fd, 0);
|
||||||
return (*address != MAP_FAILED) ? MDB_SUCCESS : errno;
|
return (*address != MAP_FAILED) ? MDB_SUCCESS : errno;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user