Currently existing parsers of syscalls that deal with 32-bit timespec
rely upon struct timespec being defined in libc and match the definition
used by the kernel. Given the upcoming y2038 changes in glibc,
this new type is going to be used instead.
* kernel_timespec.h: New file.
* Makefile.am (strace_SOURCES): Add it.
ipc_shm.c \
ipc_shmctl.c \
kcmp.c \
+ kernel_timespec.h \
kernel_types.h \
kexec.c \
keyctl.c \
--- /dev/null
+/*
+ * Copyright (c) 2019 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef STRACE_KERNEL_TIMESPEC_H
+# define STRACE_KERNEL_TIMESPEC_H
+
+# if HAVE_ARCH_TIME32_SYSCALLS
+
+typedef struct {
+ int tv_sec;
+ int tv_nsec;
+} kernel_timespec32_t;
+
+# endif /* HAVE_ARCH_TIME32_SYSCALLS */
+
+#endif /* !STRACE_KERNEL_TIMESPEC_H */