about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sparc/bits
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2020-02-11 12:56:50 -0800
committerAlistair Francis <alistair.francis@wdc.com>2020-04-02 09:21:05 -0700
commit1c634e677f584ea264f984eb408a5142150af855 (patch)
tree75fb8aa1d181e8505610b4bfaef2af93c10aabe4 /sysdeps/unix/sysv/linux/sparc/bits
parenta9d42c09a327540a99f2eac25a98fd2ad6d0b540 (diff)
downloadglibc-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/sparc/bits')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/typesizes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
index ac48c23e37..288a902b5f 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
@@ -76,10 +76,16 @@
 
 /* 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
+
+/* And for getitimer, setitimer and rusage  */
+# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0
 #endif
 
 /* Number of descriptors that can fit in an `fd_set'.  */