diff --git a/Foundation/src/Event_POSIX.cpp b/Foundation/src/Event_POSIX.cpp index 398234d67..2f3e69d0c 100644 --- a/Foundation/src/Event_POSIX.cpp +++ b/Foundation/src/Event_POSIX.cpp @@ -24,12 +24,12 @@ // // Note: pthread_cond_timedwait() with CLOCK_MONOTONIC is supported -// on Linux and QNX, as well as on Android >= 5.0. On Android < 5.0, -// HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC is defined to indicate -// availability of non-standard pthread_cond_timedwait_monotonic(). +// on Linux and QNX, as well as on Android >= 5.0 (API level 21). +// On Android < 5.0, HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC is defined +// to indicate availability of non-standard pthread_cond_timedwait_monotonic(). // #ifndef POCO_HAVE_MONOTONIC_PTHREAD_COND_TIMEDWAIT - #if (defined(__linux__) || defined(__QNX__)) && !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)) + #if (defined(__linux__) || defined(__QNX__)) && !(defined(__ANDROID__) && (defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC) || __ANDROID_API__ <= 21)) #define POCO_HAVE_MONOTONIC_PTHREAD_COND_TIMEDWAIT 1 #endif #endif diff --git a/Foundation/src/Semaphore_POSIX.cpp b/Foundation/src/Semaphore_POSIX.cpp index 9c90fdaba..226d5d44f 100644 --- a/Foundation/src/Semaphore_POSIX.cpp +++ b/Foundation/src/Semaphore_POSIX.cpp @@ -24,12 +24,12 @@ // // Note: pthread_cond_timedwait() with CLOCK_MONOTONIC is supported -// on Linux and QNX, as well as on Android >= 5.0. On Android < 5.0, -// HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC is defined to indicate -// availability of non-standard pthread_cond_timedwait_monotonic(). +// on Linux and QNX, as well as on Android >= 5.0 (API level 21). +// On Android < 5.0, HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC is defined +// to indicate availability of non-standard pthread_cond_timedwait_monotonic(). // #ifndef POCO_HAVE_MONOTONIC_PTHREAD_COND_TIMEDWAIT - #if (defined(__linux__) || defined(__QNX__)) && !(defined(__ANDROID__) && defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC)) + #if (defined(__linux__) || defined(__QNX__)) && !(defined(__ANDROID__) && (defined(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC) || __ANDROID_API__ <= 21)) #define POCO_HAVE_MONOTONIC_PTHREAD_COND_TIMEDWAIT 1 #endif #endif