From 2886f0ccb06af04927d4cd661eaf82a253426c05 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 9 Dec 2016 17:27:36 +0000 Subject: Fix sqlite databases being read-only on 64bit Android by patching sqlite (#4871) Fixes #4121 --- build/android/patches/sqlite3-readonly-fix.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 build/android/patches/sqlite3-readonly-fix.patch (limited to 'build/android/patches') diff --git a/build/android/patches/sqlite3-readonly-fix.patch b/build/android/patches/sqlite3-readonly-fix.patch new file mode 100644 index 000000000..be19055ee --- /dev/null +++ b/build/android/patches/sqlite3-readonly-fix.patch @@ -0,0 +1,17 @@ +--- sqlite3.c 2016-11-29 02:29:24.000000000 +0000 ++++ sqlite3.c 2016-12-08 22:54:54.206465377 +0000 +@@ -30445,7 +30445,14 @@ + #if OS_VXWORKS + struct vxworksFileId *pId; /* Unique file ID for vxworks. */ + #else +- ino_t ino; /* Inode number */ ++ #ifdef ANDROID ++ // Bionic's struct stat has a 64 bit st_ino on both 32 and ++ // 64 bit architectures. ino_t remains 32 bits wide on 32 bit ++ // architectures and can lead to inode truncation. ++ unsigned long long ino; /* Inode number */ ++ #else ++ ino_t ino; /* Inode number */ ++ #endif + #endif + }; -- cgit v1.2.3