blob: 36d18099c5d4034d648eb2cee4e99d396fb765e8 [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/8] 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.20.1 (Apple Git-117)