]> granicus.if.org Git - strace/commitdiff
Introduce kernel_timex32_t
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 10 May 2019 22:27:59 +0000 (22:27 +0000)
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.

Makefile.am
kernel_timex.h [new file with mode: 0644]

index 6bcfa94a6de5ecefb6f8ee445d96b80d90b3e681..5b671625eed42136fc31d0175282af72ecdcbea2 100644 (file)
@@ -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 (file)
index 0000000..e8f799c
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019 Dmitry V. Levin <ldv@altlinux.org>
+ * 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 */