linux-yocto/tools
Zhouyi Zhou 5c3dcf9164 tools/nolibc: make time_t robust if __kernel_old_time_t is missing in host headers
[ Upstream commit 0ff52df6b32a6b04a7c9dfe3d7a387aff215b482 ]

Commit d5094bcb5b ("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
94c467ddb2 ("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: d5094bcb5b ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 11:56:29 +02:00
..
accounting delayacct: improve the average delay precision of getdelay tool to microsecond 2024-10-17 15:22:06 +02:00
arch tools/x86/kcpuid: Protect against faulty "max subleaf" values 2024-10-17 15:21:41 +02:00
bootconfig tools/bootconfig: Fix the wrong format specifier 2025-02-21 13:49:20 +01:00
bpf bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure 2025-08-15 12:04:56 +02:00
build tools/build: Don't pass test log files to linker 2025-06-04 14:40:04 +02:00
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio tools: gpio: remove the include directory on make clean 2025-09-09 18:54:24 +02:00
hv tools: hv: rm .*.cmd when make clean 2024-09-30 16:23:50 +02:00
iio tools/iio: Add memory allocation failure check for trigger_name 2024-10-17 15:22:17 +02:00
include tools/nolibc: make time_t robust if __kernel_old_time_t is missing in host headers 2025-10-15 11:56:29 +02:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Fix reuse of DEVMAP 2025-10-15 11:56:26 +02:00
memory-model tools/memory-model: Fix bug in lock.cat 2024-08-03 08:49:36 +02:00
objtool objtool: Properly disable uaccess validation 2025-06-04 14:40:03 +02:00
pci
pcmcia
perf perf tests bp_account: Fix leaked file descriptor 2025-08-15 12:05:03 +02:00
power pm: cpupower: Fix the snapshot-order of tsc,mperf, clock in mperf_stop() 2025-08-28 16:25:54 +02:00
rcu
scripts tools/build: Fix s390(x) cross-compilation with clang 2025-08-28 16:25:53 +02:00
spi
testing selftests: watchdog: skip ping loop if WDIOF_KEEPALIVEPING not supported 2025-10-15 11:56:28 +02:00
thermal
time
tracing rtla/timerlat_top: Abort event processing on second signal 2025-02-21 13:49:59 +01:00
usb usbip: tools: Fix detach_port() invalid port error path 2024-11-08 16:26:44 +01:00
verification verification/dot2: Improve dot parser robustness 2024-12-14 19:54:47 +01:00
virtio
vm
wmi
Makefile