-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android < 21 must not use pthread_condattr_setclock #215
Labels
Comments
Hi, for completion, could you add the compiler error? Yes, please, could you provide a PR? |
Compile error:
In #if __ANDROID_API__ >= 21
int pthread_condattr_setclock(pthread_condattr_t* __attr, clockid_t __clock) __INTRODUCED_IN(21);
#endif /* __ANDROID_API__ >= 21 */ |
in chromium build, there is a build config for android called config.gni |
ry
pushed a commit
to denoland/chromium_build
that referenced
this issue
Sep 10, 2019
As described in boostorg/thread#215 and pocoproject/poco#1836, this API became available in NDK version 21, not NDK version 20. Change-Id: I473d19b08e7b20698eec8bc012e0035eee7070b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626298 Reviewed-by: Andrew Grieve <agrieve@chromium.org> Commit-Queue: Charlie Andrews <charliea@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#662586} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 207d5f004073f90a2108676f547a490f10fcd7f6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
the
pthread_condattr_setclock
function is only available for__ANDROID_API__ >= 21
. The unconditional use in pthread_helpers.hpp leads to an compile error.What would be the proper way to handle it? Should the preprocessor condition in
boost::pthread::cond_init
be tightened orBOOST_THREAD_INTERNAL_CLOCK_IS_MONO
not be defined on Android < 21?Would the following patch make sense?
Thanks,
Gregor
The text was updated successfully, but these errors were encountered: