From 334f191959d87062d6a78c5b021a16477bd4822f Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 5 May 2019 22:28:34 +0000 Subject: [PATCH] Introduce kernel_timespec32_t type 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. --- Makefile.am | 1 + kernel_timespec.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 kernel_timespec.h diff --git a/Makefile.am b/Makefile.am index b5946914..048e1229 100644 --- a/Makefile.am +++ b/Makefile.am @@ -156,6 +156,7 @@ strace_SOURCES = \ ipc_shm.c \ ipc_shmctl.c \ kcmp.c \ + kernel_timespec.h \ kernel_types.h \ kexec.c \ keyctl.c \ diff --git a/kernel_timespec.h b/kernel_timespec.h new file mode 100644 index 00000000..b86c8d6c --- /dev/null +++ b/kernel_timespec.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2019 Dmitry V. Levin + * 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 */ -- 2.40.0