sysv: Define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
authorAlistair Francis <alistair.francis@wdc.com>
Tue, 11 Feb 2020 20:56:50 +0000 (12:56 -0800)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 2 Apr 2020 16:21:05 +0000 (09:21 -0700)
commit1c634e677f584ea264f984eb408a5142150af855
tree75fb8aa1d181e8505610b4bfaef2af93c10aabe4
parenta9d42c09a327540a99f2eac25a98fd2ad6d0b540
sysv: Define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64

On y2038 safe 32-bit systems the Linux kernel expects itimerval
and rusage to use a 32-bit time_t, even though the other time_t's
are 64-bit. There are currently no plans to make 64-bit time_t versions
of these structs.

There are also other occurrences where the time passed to the kernel via
timeval doesn't match the wordsize.

To handle these cases let's define a new macro
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64. This macro specifies if the
kernel's old_timeval matches the new timeval64. This should be 1 for
64-bit architectures except for Alpha's osf syscalls. The define should
be 0 for 32-bit architectures and Alpha's osf syscalls.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
bits/typesizes.h
sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
sysdeps/unix/sysv/linux/generic/bits/typesizes.h
sysdeps/unix/sysv/linux/s390/bits/typesizes.h
sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
sysdeps/unix/sysv/linux/x86/bits/typesizes.h