From b3746a0973de7b8bea4b881390397aa17cc1f510 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Tue, 3 Feb 2015 13:51:52 +0100
Subject: [PATCH] contribs: vorbis: Fix msvc build

---
 contrib/src/vorbis/msvc.patch | 11 +++++++++++
 contrib/src/vorbis/rules.mak  |  3 +++
 2 files changed, 14 insertions(+)
 create mode 100644 contrib/src/vorbis/msvc.patch

diff --git a/contrib/src/vorbis/msvc.patch b/contrib/src/vorbis/msvc.patch
new file mode 100644
index 000000000000..1fa632033fa3
--- /dev/null
+++ b/contrib/src/vorbis/msvc.patch
@@ -0,0 +1,11 @@
+--- libvorbis/lib/os.h	2014-01-22 10:53:32.000000000 +0100
++++ /home/vlc/vlc/contrib/windowsphone/libvorbis/lib/os.h	2014-12-15 16:54:46.588645600 +0100
+@@ -120,7 +120,7 @@
+
+ /* MSVC inline assembly. 32 bit only; inline ASM isn't implemented in the
+  * 64 bit compiler */
+-#if defined(_MSC_VER) && !defined(_WIN64) && !defined(_WIN32_WCE)
++#if defined(_MSC_VER) && !defined(_WIN64) && !defined(_WIN32_WCE) && !defined(_M_ARM)
+ #  define VORBIS_FPU_CONTROL
+
+ typedef ogg_int16_t vorbis_fpu_control;
diff --git a/contrib/src/vorbis/rules.mak b/contrib/src/vorbis/rules.mak
index eedfbb1fd869..eed4fecec0df 100644
--- a/contrib/src/vorbis/rules.mak
+++ b/contrib/src/vorbis/rules.mak
@@ -26,6 +26,9 @@ $(TARBALLS)/libvorbis-$(VORBIS_VERSION).tar.xz:
 libvorbis: libvorbis-$(VORBIS_VERSION).tar.xz .sum-vorbis
 	$(UNPACK)
 	$(APPLY) $(SRC)/vorbis/osx.patch
+ifdef HAVE_VISUALSTUDIO
+	$(APPLY) $(SRC)/vorbis/msvc.patch
+endif
 	$(UPDATE_AUTOCONFIG)
 	$(MOVE)
 
-- 
GitLab