[vlc-commits] linux: thread: fix build on ANDROID

Thomas Guillem git at videolan.org
Thu Feb 6 09:32:25 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Feb  5 10:50:57 2020 +0100| [b5d6fb674851fcbf73eb791ba2700769f5aea5c8] | committer: Thomas Guillem

linux: thread: fix build on ANDROID

cf. 28f8c56d8ea7a0027964642148f018020a6fbf0d

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

 src/linux/thread.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/linux/thread.c b/src/linux/thread.c
index 5a89cfa44a..b926f4e1b3 100644
--- a/src/linux/thread.c
+++ b/src/linux/thread.c
@@ -60,11 +60,16 @@ static int vlc_futex_wake(void *addr, int nr)
 
 static int vlc_futex_wait(void *addr, unsigned val, const struct timespec *to)
 {
-    int ret, type;
+    int ret;
 
+#ifndef __ANDROID__
+    int type;
     pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &type);
+#endif
     ret = sys_futex(addr, FUTEX_WAIT_PRIVATE, val, to, NULL, 0);
+#ifndef __ANDROID__
     pthread_setcanceltype(type, NULL);
+#endif
     return ret;
 }
 



More information about the vlc-commits mailing list