diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2020-02-11 12:56:50 -0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-04-02 09:21:05 -0700 |
commit | 1c634e677f584ea264f984eb408a5142150af855 (patch) | |
tree | 75fb8aa1d181e8505610b4bfaef2af93c10aabe4 /sysdeps/unix/sysv/linux/x86 | |
parent | a9d42c09a327540a99f2eac25a98fd2ad6d0b540 (diff) | |
download | glibc-1c634e677f584ea264f984eb408a5142150af855.tar.gz glibc-1c634e677f584ea264f984eb408a5142150af855.tar.xz glibc-1c634e677f584ea264f984eb408a5142150af855.zip |
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/bits/typesizes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h index 87c50a4f32..1bb4a1620c 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h +++ b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h @@ -88,10 +88,15 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ |