build: ensure time_t is consistent across all supported platforms #92274
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.
Previously, the
unit_testing
andnative_sim
platforms would use a 32-bittime_t
due to the-m32
cflag.However, on glibc-based systems (at least), this can be controlled via
-D__USE_TIME_BITS64=1
.Using a 64-bit
time_t
is important for historical reasons, to be robust for the future, and also just for compatibility with all other platforms supported by Zephyr, as well as the greater Internet-of-Things at large.With that, we can move
tests/lib/timespec_util
totests/unit/timeutil
, since those tests are now platform-independent.Fixes #90029
Should probably be merged after #92255.
Testing Done (after
native_sim
fix, for bisectability):Testing Done (after
unit_testing
fix, for bisectability):Testing Done (via
twister
):