android: fix detection of pthread_condattr_setclock
It's only available on API level >= 21. PR-URL: https://github.com/libuv/libuv/pull/1441 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
e5024c54a1
commit
b6e6207c75
@ -528,7 +528,7 @@ int uv_cond_init(uv_cond_t* cond) {
|
||||
if (err)
|
||||
return -err;
|
||||
|
||||
#if !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC))
|
||||
#if !(defined(__ANDROID_API__) && __ANDROID_API__ < 21)
|
||||
err = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
|
||||
if (err)
|
||||
goto error2;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user