aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2019-07-15 07:58:28 +0000
committerdan <dan@noemail.net>2019-07-15 07:58:28 +0000
commitec9b2a132b7bd9d8e8d4890161d7ddbc79877729 (patch)
treec287cca4fb510a79616be18b2310eeadaf18ab64 /src/os_unix.c
parent08e2e8e680147a52909b292d4c0628a94f928207 (diff)
downloadsqlite-ec9b2a132b7bd9d8e8d4890161d7ddbc79877729.tar.gz
sqlite-ec9b2a132b7bd9d8e8d4890161d7ddbc79877729.zip
Call ioctl() with the correct signature on both Android and stock Linux.
FossilOrigin-Name: 68e12e063fe41bcd65cf8a120f838b9b1723ed803ea85240fe0f2145b78df2d7
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 103df1d19..0a7c4bb46 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -521,13 +521,14 @@ static struct unix_syscall {
#if defined(__linux__) && defined(SQLITE_ENABLE_BATCH_ATOMIC_WRITE)
# ifdef __ANDROID__
{ "ioctl", (sqlite3_syscall_ptr)(int(*)(int, int, ...))ioctl, 0 },
+#define osIoctl ((int(*)(int,int,...))aSyscall[28].pCurrent)
# else
{ "ioctl", (sqlite3_syscall_ptr)ioctl, 0 },
+#define osIoctl ((int(*)(int,unsigned long,...))aSyscall[28].pCurrent)
# endif
#else
{ "ioctl", (sqlite3_syscall_ptr)0, 0 },
#endif
-#define osIoctl ((int(*)(int,int,...))aSyscall[28].pCurrent)
}; /* End of the overrideable system calls */