aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-11-19 19:40:40 +0000
committerdrh <drh@noemail.net>2015-11-19 19:40:40 +0000
commit769dc6e2a22b3104583ad357b01f31a22e146a5c (patch)
treef88612242437ec891ead4c010c94a20b1d4587ee /src/os_unix.c
parent98a0e0083f33ae62a8104be5c074daa123cffc84 (diff)
parent18f8e73453be7c7a2394824739e890a4d4e8cad0 (diff)
downloadsqlite-769dc6e2a22b3104583ad357b01f31a22e146a5c.tar.gz
sqlite-769dc6e2a22b3104583ad357b01f31a22e146a5c.zip
Merge the latest enhancements from trunk.
FossilOrigin-Name: 7d6cfc79e7e5534ebacd980479917bc528a638f7
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index b322d238e..3d4524296 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3349,7 +3349,7 @@ static int unixWrite(
}
#endif
-#if SQLITE_MAX_MMAP_SIZE>0
+#if defined(SQLITE_MMAP_READWRITE) && SQLITE_MAX_MMAP_SIZE>0
/* Deal with as much of this write request as possible by transfering
** data from the memory mapping using memcpy(). */
if( offset<pFile->mmapSize ){
@@ -4774,7 +4774,9 @@ static void unixRemapfile(
assert( pFd->mmapSizeActual>=pFd->mmapSize );
assert( MAP_FAILED!=0 );
+#ifdef SQLITE_MMAP_READWRITE
if( (pFd->ctrlFlags & UNIXFILE_RDONLY)==0 ) flags |= PROT_WRITE;
+#endif
if( pOrig ){
#if HAVE_MREMAP