Fix pread64 / pwrite64 signatures for Bionic.
Change-Id: I67183b854c34e9436ff604d0fd73b4ec8ee414f2
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index 7b6c484..e92537d 100644
--- a/dist/sqlite3.c
+++ b/dist/sqlite3.c
@@ -25320,7 +25320,12 @@
#else
{ "pread64", (sqlite3_syscall_ptr)0, 0 },
#endif
+#ifdef ANDROID
+// Bionic defines pread64 using off64_t rather than off_t.
+#define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
+#else
#define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent)
+#endif
{ "write", (sqlite3_syscall_ptr)write, 0 },
#define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent)
@@ -25338,8 +25343,14 @@
#else
{ "pwrite64", (sqlite3_syscall_ptr)0, 0 },
#endif
+#ifdef ANDROID
+// Bionic defines pwrite64 using off64_t rather than off_t.
+#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
+ aSyscall[13].pCurrent)
+#else
#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off_t))\
aSyscall[13].pCurrent)
+#endif
#if SQLITE_ENABLE_LOCKING_STYLE
{ "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },