From: Michael Jeanson Date: Mon, 24 Feb 2020 20:11:03 +0000 (-0500) Subject: fix: y2038: hide timeval/timespec/itimerval/itimerspec types (v5.6) X-Git-Tag: v2.12.0-rc2~10 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=1c8460441b8caf5ddddf657f8c8c69e06bf3b9be;p=lttng-modules.git fix: y2038: hide timeval/timespec/itimerval/itimerspec types (v5.6) See upstream commit: commit c766d1472c70d25ad475cf56042af1652e792b23 Author: Arnd Bergmann Date: Thu Feb 20 20:03:57 2020 -0800 y2038: hide timeval/timespec/itimerval/itimerspec types There are no in-kernel users remaining, but there may still be users that include linux/time.h instead of sys/time.h from user space, so leave the types available to user space while hiding them from kernel space. Only the __kernel_old_* versions of these types remain now. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I986a813ad8b1c753ab1fa07f726b0cc481f049cb --- diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 6d232d53..fb14f6b0 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -77,6 +77,13 @@ struct user_msghdr; * Forward declaration for kernels >= 5.6 */ struct timex; +struct timeval; +struct itimerval; +struct itimerspec; + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)) +typedef __kernel_old_time_t time_t; +#endif #ifdef IA32_NR_syscalls #define NR_compat_syscalls IA32_NR_syscalls