Skip to content

Commit

Permalink
Fix for r-lib#126 compilation on Android
Browse files Browse the repository at this point in the history
timespec_get is not available on Android's Bionic libc -- e.g. in
sys/time.h ... This was raised as an issue in
tinycthread/tinycthread#47 and this fix is based on @mcclure's commit
mcclure/lovr@c322ce2
 ... see also android/ndk#864
  • Loading branch information
danieldjewell committed Jun 13, 2020
1 parent a83bb48 commit 7437c50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tinycthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ extern "C" {
#define TTHREAD_NORETURN
#endif

#ifdef __ANDROID__
#undef TIME_UTC
#endif

/* If TIME_UTC is missing, provide it and provide a wrapper for
timespec_get. */
#ifndef TIME_UTC
Expand Down

0 comments on commit 7437c50

Please sign in to comment.