diff options
author | Zhouyi Zhou <zhouzhouyi@gmail.com> | 2025-09-19 01:46:43 +0000 |
---|---|---|
committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-09-20 11:06:37 +0200 |
commit | 0ff52df6b32a6b04a7c9dfe3d7a387aff215b482 (patch) | |
tree | 501b8bd50bcb610f2aab00f2da47166d943fb69c /rust/helpers/helpers.c | |
parent | ca38943e83c7274a7b03b36c02807ea6d6adaac2 (diff) |
tools/nolibc: make time_t robust if __kernel_old_time_t is missing in host headers
Commit d5094bcb5bfd ("tools/nolibc: define time_t in terms of
__kernel_old_time_t") made nolibc use the kernel's time type so that
`time_t` matches `timespec::tv_sec` on all ABIs (notably x32).
But since __kernel_old_time_t is fairly new, notably from 2020 in commit
94c467ddb273 ("y2038: add __kernel_old_timespec and __kernel_old_time_t"),
nolibc builds that rely on host headers may fail.
Switch to __kernel_time_t, which is the same as __kernel_old_time_t and
has existed for longer.
Tested in PPC VM of Open Source Lab of Oregon State University
(./tools/testing/selftests/rcutorture/bin/mkinitrd.sh)
Fixes: d5094bcb5bfd ("tools/nolibc: define time_t in terms of __kernel_old_time_t")
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
[Thomas: Reformat commit and its message a bit]
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions