From 581ca236fbca8829b042e6b823fc031e570b6446 Mon Sep 17 00:00:00 2001 From: Ben Efrati Date: Thu, 5 May 2016 11:59:16 +0300 Subject: [PATCH] Fix compilation error with Android NDK pthread_yield is not implemented on Android NDK. Using sched_yield instead --- src/compat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compat.h b/src/compat.h index 34312207b..45e93f67d 100644 --- a/src/compat.h +++ b/src/compat.h @@ -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() -- 2.47.3