[vlc-commits] contrib/zvbi: fix compilation with clang

Felix Paul Kühne git at videolan.org
Mon Sep 30 11:03:15 CEST 2013


vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Aug  8 21:41:46 2013 +0200| [4781fee9197d482a31f18ae6dfd3c2776585657e] | committer: Felix Paul Kühne

contrib/zvbi: fix compilation with clang

Simplified version of initial patch

(cherry picked from commit 568ddf541776fb84e19dbd23fb900a1f6248f0b5)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=4781fee9197d482a31f18ae6dfd3c2776585657e
---

 contrib/src/zvbi/rules.mak                    |    3 +++
 contrib/src/zvbi/zvbi-fix-clang-support.patch |   30 +++++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/contrib/src/zvbi/rules.mak b/contrib/src/zvbi/rules.mak
index a9e0cd2..345f9d8 100644
--- a/contrib/src/zvbi/rules.mak
+++ b/contrib/src/zvbi/rules.mak
@@ -20,6 +20,9 @@ zvbi: zvbi-$(ZVBI_VERSION).tar.bz2 .sum-zvbi
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/zvbi/zvbi-win32.patch
 endif
+ifdef HAVE_DARWIN_OS
+	$(APPLY) $(SRC)/zvbi/zvbi-fix-clang-support.patch
+endif
 	$(MOVE)
 
 DEPS_zvbi = pthreads iconv $(DEPS_iconv)
diff --git a/contrib/src/zvbi/zvbi-fix-clang-support.patch b/contrib/src/zvbi/zvbi-fix-clang-support.patch
new file mode 100644
index 0000000..ca83c55
--- /dev/null
+++ b/contrib/src/zvbi/zvbi-fix-clang-support.patch
@@ -0,0 +1,30 @@
+diff -ru zvbi/src/misc.h zvbi-fixed/src/misc.h
+--- zvbi/src/misc.h	2013-07-02 04:32:31.000000000 +0200
++++ zvbi-fixed/src/misc.h	2013-08-08 21:37:22.000000000 +0200
+@@ -52,17 +52,6 @@
+ #  define unlikely(expr) __builtin_expect(expr, 0)
+ #endif
+ 
+-#undef __i386__
+-#undef __i686__
+-/* FIXME #cpu is deprecated
+-#if #cpu (i386)
+-#  define __i386__ 1
+-#endif
+-#if #cpu (i686)
+-#  define __i686__ 1
+-#endif
+-*/
+-
+ /* &x == PARENT (&x.tm_min, struct tm, tm_min),
+    safer than &x == (struct tm *) &x.tm_min. A NULL _ptr is safe and
+    will return NULL, not -offsetof(_member). */
+@@ -156,8 +145,6 @@
+ 
+ #define likely(expr) (expr)
+ #define unlikely(expr) (expr)
+-#undef __i386__
+-#undef __i686__
+ 
+ static char *
+ PARENT_HELPER (char *p, unsigned int offset)



More information about the vlc-commits mailing list