diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-01-19 19:28:50 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-01-19 19:29:58 -0800 |
commit | af4ab8b27c84e71dcdd6edf9e05967a3f9c3e5f2 (patch) | |
tree | 83e50e260630360f39b3943638c194c94cc16991 | |
parent | 90ed05d921d6ed7f12012d9786d53f57fafee51a (diff) |
Fix pread64 / pwrite64 signatures for Bionic.
Change-Id: I67183b854c34e9436ff604d0fd73b4ec8ee414f2
-rw-r--r-- | dist/sqlite3.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ static struct unix_syscall { #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 @@ static struct unix_syscall { #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 }, |