]> sourceware.org Git - glibc.git/commitdiff
time: Introduce glibc's internal struct __itimerspec64
authorLukasz Majewski <lukma@denx.de>
Tue, 5 Nov 2019 11:44:26 +0000 (12:44 +0100)
committerLukasz Majewski <lukma@denx.de>
Thu, 5 Dec 2019 22:16:54 +0000 (23:16 +0100)
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>
include/time.h

index c19c73ae09fd7d1f0f1017b69ab05c77268545f9..1eb3d82740b2e0eaafb51eabfb745ee7b7989e3a 100644 (file)
@@ -82,6 +82,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
This page took 0.041386 seconds and 5 git commands to generate.