This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2 2/7] y2038: Introduce __ASSUME_64BIT_TIME define
- From: Lukasz Majewski <lukma at denx dot de>
- To: libc-alpha at sourceware dot org
- Cc: Stepan Golosunov <stepan at golosunov dot pp dot ru>, Arnd Bergmann <arnd at arndb dot de>, Paul Eggert <eggert at cs dot ucla dot edu>, Joseph Myers <joseph at codesourcery dot com>, Lukasz Majewski <lukma at denx dot de>
- Date: Mon, 29 Apr 2019 12:46:08 +0200
- Subject: [PATCH v2 2/7] y2038: Introduce __ASSUME_64BIT_TIME define
- References: <20190414220841.20243-1-lukma@denx.de> <20190429104613.16209-1-lukma@denx.de>
This define indicates if the Linux kernel (5.1+) provides 64 bit versions
of time related syscalls (e.g. clock_settime64, clock_nanosleep_time64).
Those syscalls are now available on actively supported Linux architectures
and most of all are providing Y2038 correct time on 32 bit systems.
* sysdeps/unix/sysv/linux/kernel-features.h: (__ASSUME_64BIT_TIME):
[__LINUX_KERNEL_VERSION >= 0x050100]: Define.
---
Changes for v2:
- New patch
---
sysdeps/unix/sysv/linux/kernel-features.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index bc5c959f58..2dbe5ada4c 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -143,3 +143,17 @@
*/
#define __ASSUME_CLONE_DEFAULT 1
+
+/* Support for 64 bit version of clock_* Linux syscalls.
+
+ Support for following time related (and Y2038 safe) syscalls has been added
+ in the 5.1 Linux kernel:
+
+ clock_gettime64 (nr. 403)
+ clock_settime64 (nr. 404)
+ clock_getres_time64 (nr. 406)
+ clock_nanosleep_time64 (nr. 407)
+ */
+#if __LINUX_KERNEL_VERSION >= 0x050100
+# define __ASSUME_64BIT_TIME 1
+#endif
--
2.11.0