about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2019-11-05 12:44:26 +0100
committerLukasz Majewski <lukma@denx.de>2019-12-05 23:16:54 +0100
commit4b135425d889cb18b0fb3c3d166e115927042dda (patch)
tree62c0bb34547caef710fe029817f500565c0d3f3e
parent16554464bcd9d77b07c6ff419dc54f00e394fa50 (diff)
downloadglibc-4b135425d889cb18b0fb3c3d166e115927042dda.tar.gz
glibc-4b135425d889cb18b0fb3c3d166e115927042dda.tar.xz
glibc-4b135425d889cb18b0fb3c3d166e115927042dda.zip
time: Introduce glibc's internal struct __itimerspec64
This change provides the glibc's internal struct itimerspec representation,
which is explicitly supporting 64 bit time (by using struct __timespec64).

Such representation is necessary to provide correct time after Y2038
(time_t overflow) on devices with __TIMESIZE == 32.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--include/time.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
index c19c73ae09..1eb3d82740 100644
--- a/include/time.h
+++ b/include/time.h
@@ -83,6 +83,17 @@ struct __timespec64
 #endif
 
 #if __TIMESIZE == 64
+# define __itimerspec64 itimerspec
+#else
+/* The glibc's internal representation of the struct itimerspec.  */
+struct __itimerspec64
+{
+  struct __timespec64 it_interval;
+  struct __timespec64 it_value;
+};
+#endif
+
+#if __TIMESIZE == 64
 # define __ctime64 ctime
 #else
 extern char *__ctime64 (const __time64_t *__timer) __THROW;