Skip to content

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Oct 3, 2025

Description

The timespec_get function introduced in #119543 is available only on iOS 13 and later, while the minimum SDK target is iOS 12.2. This change fixes CoreCLR Apple mobile build.

Changes

Use gettimeofday to initialize timespec struct.

@kotlarmilos kotlarmilos requested review from Copilot and huoyaoyuan and removed request for Copilot October 3, 2025 08:24
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 3, 2025
@kotlarmilos kotlarmilos requested a review from jkotas October 3, 2025 08:24
@kotlarmilos kotlarmilos self-assigned this Oct 3, 2025
@kotlarmilos kotlarmilos added area-PAL-coreclr os-ios Apple iOS and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 3, 2025
@kotlarmilos kotlarmilos added this to the 11.0.0 milestone Oct 3, 2025
@huoyaoyuan
Copy link
Member

LGTM. Since the file is for debug only, it should prefer simplest approach without worrying about precision. It's also OK to be Windows/UNIX bipartite if that simplifies.

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 11:11
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a build issue on Apple mobile platforms (iOS, tvOS, macCatalyst) by replacing the use of timespec_get with gettimeofday for time retrieval in LogAssert functionality. The timespec_get function is only available on iOS 13+ while the minimum SDK target is iOS 12.2.

Key changes:

  • Added conditional compilation for Apple mobile platforms to use gettimeofday instead of timespec_get
  • Included necessary header <sys/time.h> for Apple mobile platforms
  • Converted timeval to timespec format to maintain compatibility with existing code

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/ba-g extra-platforms evaluate paths was canceled

@kotlarmilos kotlarmilos merged commit e256339 into dotnet:main Oct 3, 2025
96 of 98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants