From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) by sourceware.org (Postfix) with ESMTPS id 75205388F046 for ; Mon, 1 Jun 2020 14:08:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 75205388F046 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49bH7w4mflz1rvBg; Mon, 1 Jun 2020 16:08:12 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49bH7w4Q5nz1qwwd; Mon, 1 Jun 2020 16:08:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id MHesqUnKJVgi; Mon, 1 Jun 2020 16:08:11 +0200 (CEST) X-Auth-Info: 3OlPRGu6z40FE0OXG0sYnzBv+zIHpq8uA1tGXlYSnDU= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 1 Jun 2020 16:08:11 +0200 (CEST) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Cc: Alistair Francis , Alistair Francis , GNU C Library , Siddhesh Poyarekar , Florian Weimer , Zack Weinberg , Carlos O'Donell , Andreas Schwab , Lukasz Majewski Subject: [RFC 09/12] y2038: Convert __xclock_gettime to be Y2038 safe Date: Mon, 1 Jun 2020 16:07:37 +0200 Message-Id: <20200601140740.16371-10-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200601140740.16371-1-lukma@denx.de> References: <20200601140740.16371-1-lukma@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-21.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2020 14:08:14 -0000 The clock_gettime has been replaced with Y2038 safe __clock_gettime64. Morevoer, the struct timespec has been replaced with struct __timespec64. --- support/xclock_gettime.c | 4 ++-- support/xtime.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/support/xclock_gettime.c b/support/xclock_gettime.c index fed397b784..6d32c00847 100644 --- a/support/xclock_gettime.c +++ b/support/xclock_gettime.c @@ -21,9 +21,9 @@ #include void -__xclock_gettime (clockid_t clockid, struct timespec *ts) +__xclock_gettime (clockid_t clockid, struct __timespec64 *ts) { - const int ret = clock_gettime (clockid, ts); + const int ret = __clock_gettime64 (clockid, ts); if (ret < 0) FAIL_EXIT1 ("clock_gettime (%d): %m", clockid); diff --git a/support/xtime.h b/support/xtime.h index 0fce19a78d..f04dac14fd 100644 --- a/support/xtime.h +++ b/support/xtime.h @@ -27,7 +27,7 @@ __BEGIN_DECLS /* The following functions call the corresponding libc functions and terminate the process on error. */ -void __xclock_gettime (clockid_t clock, struct timespec *ts); +void __xclock_gettime (clockid_t clock, struct __timespec64 *ts); /* This helper can often simplify tests by avoiding an explicit variable declaration or allowing that declaration to be const. */ -- 2.20.1