[vlc-commits] [Git][videolan/vlc][master] contrib: sqlite: fix compilation with NDK26

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Apr 11 19:05:23 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b264a7f2 by Steve Lhomme at 2024-04-11T18:23:44+00:00
contrib: sqlite: fix compilation with NDK26

This is fixed in their repository but there's no release with it yet.

- - - - -


2 changed files:

- + contrib/src/sqlite/e0a9935be1c506646566f6b7845eb381bb219e16.patch
- contrib/src/sqlite/rules.mak


Changes:

=====================================
contrib/src/sqlite/e0a9935be1c506646566f6b7845eb381bb219e16.patch
=====================================
@@ -0,0 +1,32 @@
+From e0a9935be1c506646566f6b7845eb381bb219e16 Mon Sep 17 00:00:00 2001
+From: stephan <stephan at noemail.net>
+Date: Mon, 19 Feb 2024 12:20:46 +0000
+Subject: [PATCH] Extend the strerror_r() result type discrepancy check in
+ os_unix.c to include the Android NDK, as reported in [forum post
+ 3f13857fa4062301|forum:3f13857fa4062301]. The NDK's strerror_r() signature is
+ version-dependent, whereas this change assumes int return (POSIX semantic)
+ across all versions.
+
+FossilOrigin-Name: f18b2524da6bbbcf372b292df52fbe6efa49fd6e1f1f13ef2447279d559f7a08
+---
+ sqlite3.c |  6 +++++-
+ 3 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/sqlite3.c b/sqlite3.c
+index 4b3d63c2c1..4663c22d94 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -1295,8 +1295,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);


=====================================
contrib/src/sqlite/rules.mak
=====================================
@@ -22,6 +22,7 @@ $(TARBALLS)/sqlite-autoconf-$(SQLITE_VERSION).tar.gz:
 
 sqlite: sqlite-autoconf-$(SQLITE_VERSION).tar.gz .sum-sqlite
 	$(UNPACK)
+	$(APPLY) $(SRC)/sqlite/e0a9935be1c506646566f6b7845eb381bb219e16.patch
 	$(call pkg_static, "sqlite3.pc.in")
 	$(MOVE)
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b264a7f21dcdf9cc64e16746e454fa96ec3cb222

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b264a7f21dcdf9cc64e16746e454fa96ec3cb222
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list