diff options
author | drh <drh@noemail.net> | 2016-01-08 19:17:30 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2016-01-08 19:17:30 +0000 |
commit | e4a08f9e39189a0acd04648c62bcc86e2f88763c (patch) | |
tree | f98603ffb436d8b4d0dc1ae53114af2169c61fa2 /src/os_unix.c | |
parent | c0fba6d8e8168ccf20d20408a951a5c0d6d40d36 (diff) | |
download | sqlite-e4a08f9e39189a0acd04648c62bcc86e2f88763c.tar.gz sqlite-e4a08f9e39189a0acd04648c62bcc86e2f88763c.zip |
Fix a problem with #ifdefs on the system calls in the unix VFS that causes
problems when compiling with SQLITE_OMIT_WAL.
FossilOrigin-Name: ceceea4c5ee242b20ebf216593c15c11ce2c369a
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 791ba5d8d..c41b6c7c2 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -437,13 +437,20 @@ static struct unix_syscall { #define osGeteuid ((uid_t(*)(void))aSyscall[21].pCurrent) #if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 - { "mmap", (sqlite3_syscall_ptr)mmap, 0 }, + { "mmap", (sqlite3_syscall_ptr)mmap, 0 }, +#else + { "mmap", (sqlite3_syscall_ptr)0, 0 }, +#endif #define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[22].pCurrent) +#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0 { "munmap", (sqlite3_syscall_ptr)munmap, 0 }, +#else + { "munmap", (sqlite3_syscall_ptr), 0 }, +#endif #define osMunmap ((void*(*)(void*,size_t))aSyscall[23].pCurrent) -#if HAVE_MREMAP +#if HAVE_MREMAP && (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) { "mremap", (sqlite3_syscall_ptr)mremap, 0 }, #else { "mremap", (sqlite3_syscall_ptr)0, 0 }, @@ -456,7 +463,6 @@ static struct unix_syscall { { "readlink", (sqlite3_syscall_ptr)readlink, 0 }, #define osReadlink ((ssize_t(*)(const char*,char*,size_t))aSyscall[26].pCurrent) -#endif }; /* End of the overrideable system calls */ |