aboutsummaryrefslogtreecommitdiff
path: root/build/android/patches
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2016-12-09 17:27:36 +0000
committerest31 <est31@users.noreply.github.com>2016-12-09 18:27:36 +0100
commit2886f0ccb06af04927d4cd661eaf82a253426c05 (patch)
treea5a8578db6277c2b10488787e2c9251cc0b97178 /build/android/patches
parent3f88d776dcfb6d8844906ec44d9131d4519a34cb (diff)
downloadminetest-2886f0ccb06af04927d4cd661eaf82a253426c05.tar.gz
minetest-2886f0ccb06af04927d4cd661eaf82a253426c05.tar.bz2
minetest-2886f0ccb06af04927d4cd661eaf82a253426c05.zip
Fix sqlite databases being read-only on 64bit Android by patching sqlite (#4871)
Fixes #4121
Diffstat (limited to 'build/android/patches')
-rw-r--r--build/android/patches/sqlite3-readonly-fix.patch17
1 files changed, 17 insertions, 0 deletions
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
+ };