-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix HAVE_PTHREAD_CONDATTR_SETCLOCK detection on Android #58701
Conversation
Android puts pthread stuff into libc. Because this wasn't detected, we are using some iOS fallbacks in System.Native. I'm propagating how pthreads are detected in the CoreCLR PAL (that was fixed up for Android in the CoreCLR PAL a couple years ago). Failure to properly detect it here was causing build breaks in CoreCLR on Android (that's how I found this).
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@akoeplinger should we backport this? |
Ideally yes, though it's not completely without risk. Note that we still have this definition in mono-os-mutex.h which disables use of runtime/src/mono/mono/utils/mono-os-mutex.h Lines 39 to 41 in 32df679
We might want to fix that as well. I also saw that we explicitly disable CLOCK_MONOTONIC for iOS since it was only available on iOS10+, but that is now our minimum target so we can likely remove that too. |
I filed #58737 and put it into 6.0 milestone. FWIW, the old commit that disabled it on Mono on Android just talks about fixing a build break and doesn't have much else to go off. |
@MichalStrehovsky I think this change is causing the |
…)" This reverts commit a6d9e63.
Android puts pthread stuff into libc. Because this wasn't detected, we are using some iOS fallbacks in System.Native. I'm propagating how pthreads are detected in the CoreCLR PAL (that was fixed up for Android in the CoreCLR PAL a couple years ago).
Failure to properly detect it here was causing build breaks in CoreCLR on Android (that's how I found this).