From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CDB1A1F466 for ; Thu, 16 Jan 2020 13:28:13 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=h2z cRfA9CGW+WsZCw+XSJGT6sXmPQRElLdRdFDaShYeTTrai7zII7zXz9wElAUYxrvN YQkUofiu4dBYxNbOb3SZjJGffriZqQGgf8v+WVTadPyr+bXb90ctnPFvnr/Os9nd TeouOmrT1MI+X6+7ZN7XoXa3i2TFATMUeokxOYDc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=NFIVWm3XE Dk7fdRdQ4fX2sl/0Mg=; b=nXIsNgozchfa8VFX2fGe+hHYJtESc4EBfOENsm/WO 2gQXK59BqTh5PjYYCPJVzFTTngsayfwJIc/C65v6ndVIyEWoQd2Xb+3S6aCOeOL9 ueQg+iBMSrAKdjm50FLY2VD90TrTfZxhhWSV6Ox+E7YK/YkPjtrwKYge7N0xd/ZL yk= Received: (qmail 47863 invoked by alias); 16 Jan 2020 13:28:03 -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 Received: (qmail 47756 invoked by uid 89); 16 Jan 2020 13:28:03 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella , Andreas Schwab , Samuel Thibault Cc: Alistair Francis , Alistair Francis , GNU C Library , Siddhesh Poyarekar , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Lukasz Majewski Subject: [PATCH 1/2] y2038: hurd: Provide __clock_gettime64 function Date: Thu, 16 Jan 2020 14:27:27 +0100 Message-Id: <20200116132728.11646-1-lukma@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit For Linux glibc ports the __TIMESIZE == 64 ensures proper aliasing for __clock_gettime64 (to __clock_gettime). When __TIMESIZE != 64 (like ARM32, PPC) the glibc expects separate definition of the __clock_gettime64. The HURD port only provides __clock_gettime, so this patch adds __clock_gettime64 as a tiny wrapper on it. --- sysdeps/mach/clock_gettime.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c index ac3547df3c..fbd80536d5 100644 --- a/sysdeps/mach/clock_gettime.c +++ b/sysdeps/mach/clock_gettime.c @@ -49,3 +49,17 @@ versioned_symbol (libc, __clock_gettime, clock_gettime, GLIBC_2_17); strong_alias (__clock_gettime, __clock_gettime_2); compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2); #endif + +int +__clock_gettime64 (clockid_t clock_id, struct __timespec64 *ts64) +{ + struct timespec ts; + int ret; + + ret = __clock_gettime (clock_id, &ts); + if (ret == 0) + *ts64 = valid_timespec_to_timespec64 (ts); + + return ret; +} +libc_hidden_def (__clock_gettime64) -- 2.20.1