From a51e03588937ad804a9f583ea3d0fc0a4d088c33 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Mon, 23 Dec 2019 11:45:01 -0800 Subject: linux: Use long time_t __getitimer/__setitimer The Linux kernel expects itimerval to use a 32-bit time_t, even on archs with a 64-bit time_t (like RV32). To address this let's convert itimerval to/from 32-bit and 64-bit to ensure the kernel always gets a 32-bit time_t. While we are converting these functions let's also convert them to be the y2038 safe versions. This means there is a *64 function that is called by a backwards compatible wrapper. Tested-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella --- include/time.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/time.h b/include/time.h index 2523e0f..4522fe9 100644 --- a/include/time.h +++ b/include/time.h @@ -6,6 +6,7 @@ # include # include # include