Skip to content

linux(uclibc): move definition of time_t#5144

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:uclibc-time_t-patch
Open

linux(uclibc): move definition of time_t#5144
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:uclibc-time_t-patch

Conversation

@dybucc

@dybucc dybucc commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Description

This PR extends the changes in #5046 to the entirety of the uclibc module.

That patch introduced a cfg option for compatibility with the uClibc build option to get a 64-bit time_t. In that patch, though, the option was only used in 32-bit arm targets.

This patch extends that to all uClibc targets. The "configuration" macro upstream is meant for all targets, irrespective of machine word size.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI

@dybucc dybucc force-pushed the uclibc-time_t-patch branch from 6bfd246 to 77686a8 Compare June 5, 2026 08:20
@dybucc

dybucc commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

CI is failing for reasons unrelated to the changes introduced in this PR. A rerun should do it.

@dybucc dybucc force-pushed the uclibc-time_t-patch branch 4 times, most recently from 017fca3 to bf22331 Compare June 9, 2026 07:09
@dybucc dybucc force-pushed the uclibc-time_t-patch branch from bf22331 to d68fe9f Compare June 15, 2026 15:08

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, it's a nice cleanup anyway.

Regarding __UCLIBC_USE_TIME64__, this will need a cfg(libc_unstable_uclibc_use_time64) similar to what we have for gnu and musl (preferably in the style of #4977 from the start).

Tests are still pending on most platforms.

Note that it isn't on you to test tier3 targets, or anything really. CI should be able to catch most problems, the rest is just due diligence which you certainly do plenty of.

View changes since this review

@dybucc dybucc force-pushed the uclibc-time_t-patch branch from d68fe9f to 1a3d323 Compare June 19, 2026 05:54
@rustbot

This comment has been minimized.

@dybucc dybucc changed the title refactor: move definition of time_t in uclibc uclibc: move definition of time_t Jun 20, 2026
@dybucc dybucc changed the title uclibc: move definition of time_t linux(uclibc): move definition of time_t Jun 20, 2026
A recent patch [1] overhauled the `uclibc` module to add support for
"toggling" 64-bit `time_t`. That patch, though, was centered around
supported 32-bit arm targets.

This patch extends that to all platforms whose target environment
matches `uclibc`. This option is mahine word-independent.

[1]: rust-lang@2549bd4
@dybucc dybucc force-pushed the uclibc-time_t-patch branch from 1a3d323 to 2e2fbff Compare June 20, 2026 14:20
@dybucc dybucc marked this pull request as ready for review June 20, 2026 14:23
@dybucc dybucc requested a review from tgross35 June 20, 2026 14:23
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