aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordan <Dan Kennedy>2021-11-02 11:09:24 +0000
committerdan <Dan Kennedy>2021-11-02 11:09:24 +0000
commita12a40c3f00c40c3da412beff15828ff2d2e0aef (patch)
treea48b97b1dd702d10f891d06d5c2d6382b8a8e988 /src/os_unix.c
parent1cd6042f90f8d54edb1ea11b23c28a11d83c3ac3 (diff)
downloadsqlite-a12a40c3f00c40c3da412beff15828ff2d2e0aef.tar.gz
sqlite-a12a40c3f00c40c3da412beff15828ff2d2e0aef.zip
Add #ifdef logic to os_unix.c so that it builds with SQLITE_OMIT_WAL defined.
FossilOrigin-Name: 948c2cb2a2f44ba069cfbf5e9a57e56964f3a40db57459bb439bea9c3bd9f211
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index bc6063dae..0e184af3c 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3951,7 +3951,9 @@ static void unixModeBit(unixFile *pFile, unsigned char mask, int *pArg){
/* Forward declaration */
static int unixGetTempname(int nBuf, char *zBuf);
-static int unixFcntlExternalReader(unixFile*, int*);
+#ifndef SQLITE_OMIT_WAL
+ static int unixFcntlExternalReader(unixFile*, int*);
+#endif
/*
** Information and control of an open file handle.
@@ -4070,7 +4072,12 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
case SQLITE_FCNTL_EXTERNAL_READER: {
+#ifndef SQLITE_OMIT_WAL
return unixFcntlExternalReader((unixFile*)id, (int*)pArg);
+#else
+ *(int*)pArg = 0;
+ return SQLITE_OK;
+#endif
}
}
return SQLITE_NOTFOUND;