[vlc-devel] [PATCH] linux: thread: fix build on ANDROID

Thomas Guillem thomas at gllm.fr
Wed Feb 5 10:50:57 CET 2020


cf. 28f8c56d8ea7a0027964642148f018020a6fbf0d
---
 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 5a89cfa44ab..b926f4e1b31 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;
 }
 
-- 
2.20.1



More information about the vlc-devel mailing list