vlc/vlc-3.0 | branch: master | Marvin Scholz <[email protected]> | Fri Oct 11 
12:27:55 2019 +0200| [df364f9361c8236622c7e9d45fdb46fc332bce51] | committer: 
David Fuhrmann

contrib: modplug: Fix endianness check

The autoconf endianness check does not compile with a C++ compiler
due to bogus casts, therefore it is needed to use the C compiler to
check for the host endianness.

This fixes the libmodplug contrib build for Android.

(cherry picked from commit 903c250978153ef8d95a6005def39ab0ad4078f9)
Signed-off-by: David Fuhrmann <[email protected]>

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

 contrib/src/modplug/fix-endianness-check.diff | 12 ++++++++++++
 contrib/src/modplug/rules.mak                 |  1 +
 2 files changed, 13 insertions(+)

diff --git a/contrib/src/modplug/fix-endianness-check.diff 
b/contrib/src/modplug/fix-endianness-check.diff
new file mode 100644
index 0000000000..b880f51c98
--- /dev/null
+++ b/contrib/src/modplug/fix-endianness-check.diff
@@ -0,0 +1,12 @@
+--- ./configure.ac.orig        2019-10-11 12:40:29.000000000 +0200
++++ ./configure.ac     2019-10-11 12:40:50.000000000 +0200
+@@ -21,7 +21,9 @@ AC_DISABLE_STATIC([])
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_LANG([C++])
++AC_LANG_PUSH([C])
+ AC_C_BIGENDIAN
++AC_LANG_POP([C])
+ 
+ #AC_LIBTOOL_WIN32_DLL
+ #AC_PROG_LIBTOOL
diff --git a/contrib/src/modplug/rules.mak b/contrib/src/modplug/rules.mak
index d511f42c73..6776bfbbe6 100644
--- a/contrib/src/modplug/rules.mak
+++ b/contrib/src/modplug/rules.mak
@@ -17,6 +17,7 @@ libmodplug: libmodplug-$(MODPLUG_VERSION).tar.gz .sum-modplug
        $(UNPACK)
        $(APPLY) $(SRC)/modplug/modplug-win32-static.patch
        $(APPLY) $(SRC)/modplug/macosx-do-not-force-min-version.patch
+       $(APPLY) $(SRC)/modplug/fix-endianness-check.diff
        $(call pkg_static,"libmodplug.pc.in")
        $(MOVE)
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to