[vlc-devel] [PATCH] Add workaround patch for pthread conditional attributes
Edward Wang
edward.c.wang at compdigitec.com
Tue Jan 3 15:04:07 CET 2012
Patch for vlc-ports/android.git to add another pthread patch on Android to ensure compatibility with Android 2.1
Thanks,
Edward Wang
---
...-pthread-conditional-attribute-workaround.patch | 39 ++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
create mode 100644 patches/0008-Add-pthread-conditional-attribute-workaround.patch
diff --git a/patches/0008-Add-pthread-conditional-attribute-workaround.patch b/patches/0008-Add-pthread-conditional-attribute-workaround.patch
new file mode 100644
index 0000000..0a27d58
--- /dev/null
+++ b/patches/0008-Add-pthread-conditional-attribute-workaround.patch
@@ -0,0 +1,39 @@
+From 2c874b63873e7cad67776b6c9a10906248f72140 Mon Sep 17 00:00:00 2001
+From: Edward Wang <edward.c.wang at compdigitec.com>
+Date: Mon, 2 Jan 2012 21:24:18 -0500
+Subject: [PATCH] Add pthread conditional attribute workaround
+
+---
+ src/posix/thread.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/src/posix/thread.c b/src/posix/thread.c
+index dd5b2fd..8edd56d 100644
+--- a/src/posix/thread.c
++++ b/src/posix/thread.c
+@@ -358,14 +358,22 @@ void vlc_cond_init (vlc_cond_t *p_condvar)
+ pthread_condattr_t attr;
+
+ vlc_clock_setup ();
++#ifndef __ANDROID__
+ if (unlikely(pthread_condattr_init (&attr)))
+ abort ();
++#endif
+ #if (_POSIX_CLOCK_SELECTION > 0)
+ pthread_condattr_setclock (&attr, vlc_clock_id);
+ #endif
++#ifdef __ANDROID__
++ if (unlikely(pthread_cond_init (p_condvar, NULL)))
++#else
+ if (unlikely(pthread_cond_init (p_condvar, &attr)))
++#endif
+ abort ();
++#ifndef __ANDROID__
+ pthread_condattr_destroy (&attr);
++#endif
+ }
+
+ /**
+--
+1.7.5.4
+
--
1.7.5.4
More information about the vlc-devel
mailing list