diff options
Diffstat (limited to 'dist/Android.patch')
-rw-r--r-- | dist/Android.patch | 54 |
1 files changed, 13 insertions, 41 deletions
diff --git a/dist/Android.patch b/dist/Android.patch index 342e967..9e0093e 100644 --- a/dist/Android.patch +++ b/dist/Android.patch @@ -1,6 +1,6 @@ diff -r -u -d orig/shell.c ./shell.c ---- orig/shell.c 2016-04-16 21:02:33.163176554 -0700 -+++ ./shell.c 2016-04-16 21:02:33.207176154 -0700 +--- orig/shell.c 2016-05-18 13:07:03.000000000 +0200 ++++ ./shell.c 2016-07-10 13:46:29.256283352 +0200 @@ -52,6 +52,12 @@ #endif #include <ctype.h> @@ -14,7 +14,7 @@ diff -r -u -d orig/shell.c ./shell.c #if !defined(_WIN32) && !defined(WIN32) # include <signal.h> -@@ -1943,6 +1949,22 @@ +@@ -2368,6 +2374,22 @@ readfileFunc, 0, 0); sqlite3_create_function(p->db, "writefile", 2, SQLITE_UTF8, 0, writefileFunc, 0, 0); @@ -38,37 +38,9 @@ diff -r -u -d orig/shell.c ./shell.c } diff -r -u -d orig/sqlite3.c ./sqlite3.c ---- orig/sqlite3.c 2016-04-16 21:02:33.203176190 -0700 -+++ ./sqlite3.c 2016-04-16 21:52:23.179841572 -0700 -@@ -27024,7 +27024,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) -@@ -27042,8 +27047,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 - - { "fchmod", (sqlite3_syscall_ptr)fchmod, 0 }, - #define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent) -@@ -30292,7 +30303,7 @@ +--- orig/sqlite3.c 2016-05-18 13:07:03.000000000 +0200 ++++ ./sqlite3.c 2016-07-10 14:08:07.553031674 +0200 +@@ -32748,7 +32748,7 @@ SimulateIOError( rc=1 ); if( rc!=0 ){ storeLastErrno((unixFile*)id, errno); @@ -77,7 +49,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } *pSize = buf.st_size; -@@ -30328,7 +30339,7 @@ +@@ -32784,7 +32784,7 @@ struct stat buf; /* Used to hold return values of fstat() */ if( osFstat(pFile->h, &buf) ){ @@ -86,16 +58,16 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk; -@@ -30913,7 +30924,7 @@ +@@ -33358,7 +33358,7 @@ ** with the same permissions. */ - if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){ + if( osFstat(pDbFd->h, &sStat) ){ - rc = SQLITE_IOERR_FSTAT; + rc = unixLogError(SQLITE_IOERR_FSTAT, "fstat", pDbFd->zPath); goto shm_open_err; } -@@ -32260,7 +32271,7 @@ +@@ -34697,7 +34697,7 @@ *pUid = sStat.st_uid; *pGid = sStat.st_gid; }else{ @@ -104,16 +76,16 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){ *pMode = 0600; -@@ -108046,7 +108057,7 @@ +@@ -112267,7 +112267,7 @@ } if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){ sqlite3SetString(pzErrMsg, db, "unsupported file format"); - rc = SQLITE_ERROR; -+ rc = SQLITE_CORRUPT_BKPT; // Android Change from "rc = SQLITE_ERROR;" ++ rc = SQLITE_CORRUPT_BKPT; // Android Change from "rc = SQLITE_ERROR;"; goto initone_error_out; } -@@ -139786,13 +139797,25 @@ +@@ -144810,13 +144810,25 @@ ** module with sqlite. */ if( SQLITE_OK==rc |