[vlc-devel] [PATCH 1/5] contrib: gme: fix android build

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


gcc doesn't understand __restrict, use __restrict__
might break MSVC++ compatibility
---
 contrib/src/gme/android.patch |   11 +++++++++++
 contrib/src/gme/rules.mak     |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)
 create mode 100644 contrib/src/gme/android.patch

diff --git a/contrib/src/gme/android.patch b/contrib/src/gme/android.patch
new file mode 100644
index 0000000..f615a7d
--- /dev/null
+++ b/contrib/src/gme/android.patch
@@ -0,0 +1,11 @@
+--- game-music-emu/gme/Blip_Buffer.h.orig	2011-12-25 22:27:15.546377001 -0500
++++ game-music-emu/gme/Blip_Buffer.h	2011-12-25 22:27:37.146377002 -0500
+@@ -268,7 +268,7 @@
+ };
+ 
+ 	#if defined (__GNUC__) || _MSC_VER >= 1100
+-		#define BLIP_RESTRICT __restrict
++		#define BLIP_RESTRICT __restrict__
+ 	#else
+ 		#define BLIP_RESTRICT
+ 	#endif
diff --git a/contrib/src/gme/rules.mak b/contrib/src/gme/rules.mak
index ac5dcc5..ce633b8 100644
--- a/contrib/src/gme/rules.mak
+++ b/contrib/src/gme/rules.mak
@@ -13,6 +13,7 @@ $(TARBALLS)/game-music-emu-$(GME_VERSION).tar.bz2:
 game-music-emu: game-music-emu-$(GME_VERSION).tar.bz2 .sum-gme
 	$(UNPACK)
 	$(APPLY) $(SRC)/gme/gme-static.patch
+	$(APPLY) $(SRC)/gme/android.patch
 	$(MOVE)
 
 .gme: game-music-emu toolchain.cmake
-- 
1.7.7.3



More information about the vlc-devel mailing list