blob: 11f8c6a92d610b66b8486ad5fa0e2db5fc31abee [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sarthak Kukreti <sarthakkukreti@chromium.org>
Date: Mon, 15 Jul 2019 17:23:45 -0700
Subject: [PATCH 1/6] Call ioctl() with the correct signature on both Android
and stock Linux.
This backports https://sqlite.org/src/info/68e12e063fe41bcd
Bug: 901872
---
third_party/sqlite/patched/src/os_unix.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/third_party/sqlite/patched/src/os_unix.c b/third_party/sqlite/patched/src/os_unix.c
index 52ef64116444..894c725b5265 100644
--- a/third_party/sqlite/patched/src/os_unix.c
+++ b/third_party/sqlite/patched/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 */
--
2.23.0.351.gc4317032e6-goog