aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2013-05-02 17:37:31 +0000
committerdan <dan@noemail.net>2013-05-02 17:37:31 +0000
commit32c12fe2bb8e4405db53918204d192760655e51a (patch)
tree67d559efc1c157d6b74ca41f797e377a09a26fd7 /src
parenta309552e2cc3aa3de14c7fd5a6110375d4efb43d (diff)
downloadsqlite-32c12fe2bb8e4405db53918204d192760655e51a.tar.gz
sqlite-32c12fe2bb8e4405db53918204d192760655e51a.zip
Minor fixes for compilation with SQLITE_OMIT_WAL defined.
FossilOrigin-Name: b81e87e72b976e7157a53a50abc5422e2a6c4c39
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c2
-rw-r--r--src/pager.c5
-rw-r--r--src/wal.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 007441241..6eed67407 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -126,7 +126,7 @@
#include <time.h>
#include <sys/time.h>
#include <errno.h>
-#ifndef SQLITE_OMIT_WAL
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
#include <sys/mman.h>
#endif
diff --git a/src/pager.c b/src/pager.c
index dffcf602d..1c6a84fea 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -2871,10 +2871,13 @@ static int readDbPage(PgHdr *pPg, u32 iFrame){
return SQLITE_OK;
}
+#ifndef SQLITE_OMIT_WAL
if( iFrame ){
/* Try to pull the page from the write-ahead log. */
rc = sqlite3WalReadFrame(pPager->pWal, iFrame, pgsz, pPg->pData);
- }else{
+ }else
+#endif
+ {
i64 iOffset = (pgno-1)*(i64)pPager->pageSize;
rc = sqlite3OsRead(pPager->fd, pPg->pData, pgsz, iOffset);
if( rc==SQLITE_IOERR_SHORT_READ ){
diff --git a/src/wal.h b/src/wal.h
index ff7624af6..092546354 100644
--- a/src/wal.h
+++ b/src/wal.h
@@ -43,6 +43,7 @@
# define sqlite3WalExclusiveMode(y,z) 0
# define sqlite3WalHeapMemory(z) 0
# define sqlite3WalFramesize(z) 0
+# define sqlite3WalFindFrame(x,y,z) 0
#else
#define WAL_SAVEPOINT_NDATA 4