[vlc-commits] Contribs: fix lua compilation with old Android versions

Jean-Baptiste Kempf git at videolan.org
Wed Mar 16 16:22:40 CET 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Mar 16 16:14:49 2016 +0100| [651eff7e96e1a4a983d6ff161c7b8e07505ba203] | committer: Jean-Baptiste Kempf

Contribs: fix lua compilation with old Android versions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=651eff7e96e1a4a983d6ff161c7b8e07505ba203
---

 contrib/src/lua/lua-android-log2.patch |   11 +++++++++++
 contrib/src/lua/rules.mak              |    1 +
 2 files changed, 12 insertions(+)

diff --git a/contrib/src/lua/lua-android-log2.patch b/contrib/src/lua/lua-android-log2.patch
new file mode 100644
index 0000000..8b55817
--- /dev/null
+++ b/contrib/src/lua/lua-android-log2.patch
@@ -0,0 +1,11 @@
+--- lua/src/lmathlib.c	2016-03-16 16:13:27.593329107 +0100
++++ lua/src/lmathlib.c.new	2016-03-16 16:13:05.285328491 +0100
+@@ -183,7 +183,7 @@
+     res = l_mathop(log)(x);
+   else {
+     lua_Number base = luaL_checknumber(L, 2);
+-#if !defined(LUA_USE_C89)
++#if !defined(LUA_USE_C89) && !defined(__ANDROID__)
+     if (base == 2.0) res = l_mathop(log2)(x); else
+ #endif
+     if (base == 10.0) res = l_mathop(log10)(x);
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index 512c3c3..17b8cef 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -47,6 +47,7 @@ lua: lua-$(LUA_VERSION).tar.gz .sum-lua
 	$(APPLY) $(SRC)/lua/lua-noreadline.patch
 	$(APPLY) $(SRC)/lua/no-dylibs.patch
 	$(APPLY) $(SRC)/lua/no-localeconv.patch
+	$(APPLY) $(SRC)/lua/lua-android-log2.patch
 ifdef HAVE_DARWIN_OS
 	(cd $(UNPACK_DIR) && \
 	sed -e 's%gcc%$(CC)%' \



More information about the vlc-commits mailing list