From patchwork Sat Jan 18 07:20:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 37430 Received: (qmail 58621 invoked by alias); 18 Jan 2020 07:21:18 -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 58607 invoked by uid 89); 18 Jan 2020 07:21:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.9 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=HContent-Transfer-Encoding:8bit X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella , Samuel Thibault Cc: Alistair Francis , Alistair Francis , GNU C Library , Siddhesh Poyarekar , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Andreas Schwab , Lukasz Majewski Subject: [PATCH 2/6] y2038: hurd: Provide __clock_settime64 function Date: Sat, 18 Jan 2020 08:20:43 +0100 Message-Id: <20200118072047.23071-3-lukma@denx.de> In-Reply-To: <20200118072047.23071-1-lukma@denx.de> References: <20200118072047.23071-1-lukma@denx.de> MIME-Version: 1.0 For Linux glibc ports the __TIMESIZE == 64 ensures proper aliasing for __clock_settime64 (to __clock_settime). When __TIMESIZE != 64 (like ARM32, PPC) the glibc expects separate definition of the __clock_settime64. The HURD port only provides __clock_settime, so this patch adds __clock_settime64 as a tiny wrapper on it. --- sysdeps/mach/hurd/clock_settime.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sysdeps/mach/hurd/clock_settime.c b/sysdeps/mach/hurd/clock_settime.c index 2c77bad71a..db1ba860dc 100644 --- a/sysdeps/mach/hurd/clock_settime.c +++ b/sysdeps/mach/hurd/clock_settime.c @@ -53,3 +53,12 @@ versioned_symbol (libc, __clock_settime, clock_settime, GLIBC_2_17); strong_alias (__clock_settime, __clock_settime_2); compat_symbol (libc, __clock_settime_2, clock_settime, GLIBC_2_2); #endif + +int +__clock_settime64 (clockid_t clock_id, const struct __timespec64 *ts64) +{ + struct timespec ts = valid_timespec64_to_timespec (*ts64); + + return __clock_settime (clock_id, &ts); +} +libc_hidden_def (__clock_settime64)