From patchwork Mon Apr 29 10:46:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 32446 Received: (qmail 97193 invoked by alias); 29 Apr 2019 10:46:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 97174 invoked by uid 89); 29 Apr 2019 10:46:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*Ad:D*ucla.edu, H*r:192.168.8, H*Ad:D*edu X-HELO: mail-out.m-online.net From: Lukasz Majewski To: libc-alpha@sourceware.org Cc: Stepan Golosunov , Arnd Bergmann , Paul Eggert , Joseph Myers , Lukasz Majewski Subject: [PATCH v2 2/7] y2038: Introduce __ASSUME_64BIT_TIME define Date: Mon, 29 Apr 2019 12:46:08 +0200 Message-Id: <20190429104613.16209-3-lukma@denx.de> In-Reply-To: <20190429104613.16209-1-lukma@denx.de> 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