Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport SQLite version upgrade to android-10.x.x #3238

Open
wants to merge 3 commits into
base: android-10.x.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions scripts/vendor/sqlite-ndk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/vendor/sqlite/src/sqlite3.c b/vendor/sqlite/src/sqlite3.c
index 08c593e55c..e3757f968b 100644
--- a/vendor/sqlite/src/sqlite3.c
+++ b/vendor/sqlite/src/sqlite3.c
@@ -39324,8 +39324,12 @@ static int unixLogErrorAtLine(
** available, the error message will often be an empty string. Not a
** huge problem. Incorrectly concluding that the GNU version is available
** could lead to a segfault though.
+ **
+ ** Forum post 3f13857fa4062301 reports that the Android SDK may use
+ ** int-type return, depending on its version.
*/
-#if defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)
+#if (defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)) \
+ && !defined(ANDROID) && !defined(__ANDROID__)
zErr =
# endif
strerror_r(iErrno, aErr, sizeof(aErr)-1);
12 changes: 9 additions & 3 deletions scripts/vendor/sqlite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"

NAME=sqlite
VERSION=3.24.0
ROOT=sqlite-amalgamation-3240000
VERSION=3.45.3
ROOT=sqlite-amalgamation-3450300

download "https://www.sqlite.org/2018/$ROOT.zip"
download "https://www.sqlite.org/2024/$ROOT.zip"
init
extract_zip "$ROOT/sqlite3.*"
mkdir -p include src
mv sqlite3.h include
mv sqlite3.c src
file_list include src -name "*.h" -o -name "*.c"

# We need this patch for compiling on Android
# See https://www.sqlite.org/src/info/f18b2524da6bbbcf
# should be removed when we update SQLite
# and this is included in the release
git apply $PWD/../../scripts/vendor/sqlite-ndk.patch
Loading