From: Dmitry V. Levin Date: Fri, 10 May 2019 22:27:59 +0000 (+0000) Subject: Introduce kernel_timex32_t X-Git-Tag: v5.1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=522fdf070a876512212a8bd46ab81c8d8c143372;p=strace Introduce kernel_timex32_t Currently existing parsers of syscalls that deal with 32-bit timex rely upon struct timex 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_timex.h: New file. * Makefile.am (strace_SOURCES): Add it. --- diff --git a/Makefile.am b/Makefile.am index 6bcfa94a..5b671625 100644 --- a/Makefile.am +++ b/Makefile.am @@ -157,6 +157,7 @@ strace_SOURCES = \ ipc_shmctl.c \ kcmp.c \ kernel_timespec.h \ + kernel_timex.h \ kernel_types.h \ kexec.c \ keyctl.c \ diff --git a/kernel_timex.h b/kernel_timex.h new file mode 100644 index 00000000..e8f799c8 --- /dev/null +++ b/kernel_timex.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2019 Dmitry V. Levin + * All rights reserved. + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef STRACE_KERNEL_TIMEX_H +# define STRACE_KERNEL_TIMEX_H + +# if HAVE_ARCH_TIME32_SYSCALLS + +typedef struct { + unsigned int modes; + int offset; + int freq; + int maxerror; + int esterror; + int status; + int constant; + int precision; + int tolerance; + struct { + int tv_sec; + int tv_usec; + } time; + int tick; + int ppsfreq; + int jitter; + int shift; + int stabil; + int jitcnt; + int calcnt; + int errcnt; + int stbcnt; + int tai; + int pad0[11]; +} kernel_timex32_t; + +# endif /* HAVE_ARCH_TIME32_SYSCALLS */ + +#endif /* !STRACE_KERNEL_TIMEX_H */