]> git.sesse.net Git - vlc/commitdiff
contribs: opus: Fix MSVC build
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 9 Jan 2015 16:47:55 +0000 (17:47 +0100)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 27 Feb 2015 14:50:43 +0000 (15:50 +0100)
This is applied upstream and can be removed when we update opus version

contrib/src/opus/msvc.patch [new file with mode: 0644]
contrib/src/opus/rules.mak

diff --git a/contrib/src/opus/msvc.patch b/contrib/src/opus/msvc.patch
new file mode 100644 (file)
index 0000000..5167719
--- /dev/null
@@ -0,0 +1,11 @@
+--- opus/celt/float_cast.h     2013-11-29 21:17:15.000000000 +0100
++++ /home/vlc/vlc/contrib/windowsphone/opus/celt/float_cast.h  2014-12-15 16:55:21.951193100 +0100
+@@ -97,7 +97,7 @@
+         {
+                 return _mm_cvtss_si32(_mm_load_ss(&value));
+         }
+-#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN32) || defined (_WIN32))
++#elif (defined(_MSC_VER) && _MSC_VER >= 1400) && (defined (WIN32) || defined (_WIN32)) && !defined(_M_ARM)
+         #include <math.h>
+
+         /*      Win32 doesn't seem to have these functions.
index 56f09336f2328df1366b0d9a6e01f7f31f1e55ef..b7e7959343de007f4bb1ea483e61e71f88b2271a 100644 (file)
@@ -17,6 +17,9 @@ $(TARBALLS)/opus-$(OPUS_VERSION).tar.gz:
 opus: opus-$(OPUS_VERSION).tar.gz .sum-opus
        $(UNPACK)
        $(UPDATE_AUTOCONFIG)
+ifdef HAVE_VISUALSTUDIO
+       $(APPLY) $(SRC)/opus/msvc.patch
+endif
        $(MOVE)
 
 OPUS_CONF= --disable-extra-programs --disable-doc