That API is only available on API 30+ devices (note the __INTRODUCED_IN(30)
):
int pthread_cond_clockwait(pthread_cond_t* __cond,
pthread_mutex_t* __mutex,
clockid_t __clock,
const struct timespec* __timeout) __INTRODUCED_IN(30);
You're probably seeing the problem on an older device.
As per the Android documentation, it is important to realize that the NDK API level is your app's minimum supported API level:
The API level you build against with the NDK has a very different meaning than compileSdkVersion does for Java. The NDK API level is your app's minimum supported API level. In ndk-build, this is your APP_PLATFORM setting. With CMake, this is -DANDROID_PLATFORM.
So you need to compile the library with the correct NDK API level:
Problem: Your NDK API level is higher than the API supported by your device.
Solution: Set your NDK API level (APP_PLATFORM) to the minimum version of Android your app supports.