[vlc-devel] [PATCH 2/5] contrib: lua: fix android build

Rafaël Carré funman at videolan.org
Tue Dec 27 03:30:23 CET 2011


android's struct lconv is empty
according to the headers it's not supported at all, and defined only to
make libstdc++ build happy
---
 contrib/src/lua/android.patch |   13 +++++++++++++
 contrib/src/lua/rules.mak     |    3 +++
 2 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 contrib/src/lua/android.patch

diff --git a/contrib/src/lua/android.patch b/contrib/src/lua/android.patch
new file mode 100644
index 0000000..02d67c0
--- /dev/null
+++ b/contrib/src/lua/android.patch
@@ -0,0 +1,13 @@
+--- lua/src/llex.c.orig	2011-12-25 23:39:35.254829002 -0500
++++ lua/src/llex.c	2011-12-25 23:39:59.662829001 -0500
+@@ -176,9 +176,8 @@
+ 
+ static void trydecpoint (LexState *ls, SemInfo *seminfo) {
+   /* format error: try to update decimal point separator */
+-  struct lconv *cv = localeconv();
+   char old = ls->decpoint;
+-  ls->decpoint = (cv ? cv->decimal_point[0] : '.');
++  ls->decpoint = '.';
+   buffreplace(ls, old, ls->decpoint);  /* try updated decimal separator */
+   if (!luaO_str2d(luaZ_buffer(ls->buff), &seminfo->r)) {
+     /* format error with correct decimal point: no more options */
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index fc11618..328d96f 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -33,6 +33,9 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
 	$(UNPACK)
 	$(APPLY) $(SRC)/lua/lua-noreadline.patch
 	$(APPLY) $(SRC)/lua/luac-32bits.patch
+ifdef HAVE_ANDROID
+	$(APPLY) $(SRC)/lua/android.patch
+endif
 ifdef HAVE_MACOSX
 	(cd $(UNPACK_DIR) && \
 	sed -e 's%gcc%$(CC)%' \
-- 
1.7.7.3



More information about the vlc-devel mailing list