distribution/packages/databases/sqlite/patches/sqlite-01_map_populate.patch
2022-02-05 09:23:32 -05:00

22 lines
782 B
Diff

diff --git a/sqlite3.c b/sqlite3.c
index d0057a6..63b80c7 100644
--- a/sqlite3.c
+++ b/sqlite3.c
@@ -28278,7 +28278,7 @@ static void unixRemapfile(
pNew = osMremap(pOrig, nReuse, nNew, MREMAP_MAYMOVE);
zErr = "mremap";
#else
- pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED, h, nReuse);
+ pNew = osMmap(pReq, nNew-nReuse, flags, MAP_SHARED | MAP_POPULATE, h, nReuse);
if( pNew!=MAP_FAILED ){
if( pNew!=pReq ){
osMunmap(pNew, nNew - nReuse);
@@ -28297,7 +28297,7 @@ static void unixRemapfile(
/* If pNew is still NULL, try to create an entirely new mapping. */
if( pNew==0 ){
- pNew = osMmap(0, nNew, flags, MAP_SHARED, h, 0);
+ pNew = osMmap(0, nNew, flags, MAP_SHARED | MAP_POPULATE, h, 0);
}
if( pNew==MAP_FAILED ){