Fix Android debug build: Add HOST_ANDROID to timespec_get fallback#121425
Merged
Fix Android debug build: Add HOST_ANDROID to timespec_get fallback#121425
Conversation
Co-authored-by: steveisok <471438+steveisok@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix debug compilation issue for Android due to timespec_get
Fix Android debug build: Add HOST_ANDROID to timespec_get fallback
Nov 6, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR extends platform support for time-related functionality by adding Android to the list of platforms that use gettimeofday() instead of timespec_get(). The change addresses compatibility issues on Android API levels that don't support timespec_get().
Key Changes
- Added
HOST_ANDROIDto platform conditionals for time-related code - Updated comment to clarify Android API level compatibility
- Ensures consistent time retrieval mechanism across mobile platforms
This was referenced Nov 7, 2025
Open
simonrozsival
approved these changes
Nov 7, 2025
mdh1418
approved these changes
Nov 7, 2025
Member
|
/ba-g Unrelated helix timeout the job running on agent NetCore-Public 593 ran longer than the maximum time of 180 minutes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
timespec_getis not available on the Android API levels we target, causing compilation failures in debug builds ofsrc/coreclr/utilcode/debug.cpp.Changes
HOST_ANDROIDto the existing preprocessor conditionals that selectgettimeofdayovertimespec_get<sys/time.h>to include AndroidAndroid now follows the same codepath as iOS, tvOS, and macCatalyst:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.