linux(uclibc): move definition of time_t#5144
Open
dybucc wants to merge 1 commit into
Open
Conversation
6bfd246 to
77686a8
Compare
Contributor
Author
|
CI is failing for reasons unrelated to the changes introduced in this PR. A rerun should do it. |
017fca3 to
bf22331
Compare
bf22331 to
d68fe9f
Compare
tgross35
approved these changes
Jun 18, 2026
Contributor
There was a problem hiding this comment.
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.
d68fe9f to
1a3d323
Compare
This comment has been minimized.
This comment has been minimized.
time_t in uclibctime_t
time_ttime_t
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
1a3d323 to
2e2fbff
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR extends the changes in #5046 to the entirety of the
uclibcmodule.That patch introduced a
cfgoption for compatibility with the uClibc build option to get a 64-bittime_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
Upstream uclibc-ng sources showing the
types.hheader with the definition of the type thattime_tis defined as and the fragment from which that "nested" defintion stems from. Note the comment above the latter source below, where some developer left a note on the explicit GCC "bit-width configurations" uclibc-ng supports.Upstream uclibc-ng sources showing the use of the
__UCLIBC_USE_TIME64__macro to ensure the type of the type with whichtime_tis ultimately defined is either 64 bits or a Clong.Checklist
libc-test/semverhave been updated*LASTor*MAXare included (see #3131)cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI