]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix compilation error with Android NDK
authorBen Efrati <ben1189@gmail.com>
Thu, 5 May 2016 08:59:16 +0000 (11:59 +0300)
committerJaroslav Kysela <perex@perex.cz>
Thu, 5 May 2016 15:25:36 +0000 (17:25 +0200)
pthread_yield is not implemented on Android NDK.
Using sched_yield instead

src/compat.h

index 34312207b440863b538998029b073484cbc77ac1..45e93f67de33213f4aacef0149181d25d653467c 100644 (file)
@@ -31,6 +31,9 @@
 #ifndef index
 #define index(...) strchr(__VA_ARGS__)
 #endif
+#ifndef pthread_yield
+#define pthread_yield() sched_yield()
+#endif
 #define S_IEXEC S_IXUSR
 #define epoll_create1(EPOLL_CLOEXEC) epoll_create(n)
 #define inotify_init1(IN_CLOEXEC) inotify_init()