]> git.ipfire.org Git - thirdparty/glibc.git/commit
linux: Use long time_t __getitimer/__setitimer
authorAlistair Francis <alistair.francis@wdc.com>
Mon, 23 Dec 2019 19:45:01 +0000 (11:45 -0800)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 2 Apr 2020 16:21:06 +0000 (09:21 -0700)
commita51e03588937ad804a9f583ea3d0fc0a4d088c33
treef77bf16cbc4562ca3cc40625042406f20f230e78
parent1c634e677f584ea264f984eb408a5142150af855
linux: Use long time_t __getitimer/__setitimer

The Linux kernel expects itimerval to use a 32-bit time_t, even on archs
with a 64-bit time_t (like RV32). To address this let's convert
itimerval to/from 32-bit and 64-bit to ensure the kernel always gets
a 32-bit time_t.

While we are converting these functions let's also convert them to be
the y2038 safe versions. This means there is a *64 function that is
called by a backwards compatible wrapper.

Tested-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
include/time.h
sysdeps/unix/syscalls.list
sysdeps/unix/sysv/linux/getitimer.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/setitimer.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/tv32-compat.h [new file with mode: 0644]