aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2016-01-11 18:30:34 +0000
committerdan <dan@noemail.net>2016-01-11 18:30:34 +0000
commit166e7e970548a5c6cbcbf96067c4e84e20377b39 (patch)
tree2260365bbf7ee333cbb2264178f3ac4664a84a3e /src/os_unix.c
parent6a657b2477c4b8d5b67506e9a553a150d482bc1b (diff)
parent69f6e2587bef21d7faa3f11748529ac8b96f8641 (diff)
downloadsqlite-166e7e970548a5c6cbcbf96067c4e84e20377b39.tar.gz
sqlite-166e7e970548a5c6cbcbf96067c4e84e20377b39.zip
Merge trunk with this branch.
FossilOrigin-Name: a73d245f2e523a57163bc93d9fb6a74c4cdf21e7
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 791ba5d8d..a40a86678 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -437,26 +437,36 @@ 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, 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 },
#endif
#define osMremap ((void*(*)(void*,size_t,size_t,int,...))aSyscall[24].pCurrent)
+#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
{ "getpagesize", (sqlite3_syscall_ptr)unixGetpagesize, 0 },
+#else
+ { "getpagesize", (sqlite3_syscall_ptr)0, 0 },
+#endif
#define osGetpagesize ((int(*)(void))aSyscall[25].pCurrent)
{ "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 */