Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix compilation error with Android NDK
pthread_yield is not implemented on Android NDK.
Using sched_yield instead
  • Loading branch information
BenEfrati authored and perexg committed May 5, 2016
1 parent 0faba8a commit 581ca23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/compat.h
Expand Up @@ -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()
Expand Down

0 comments on commit 581ca23

Please sign in to comment.