From patchwork Fri May 19 18:25:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 69695 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 30031385703C for ; Fri, 19 May 2023 18:26:10 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 65F343858C41 for ; Fri, 19 May 2023 18:25:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 65F343858C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id BF354201A7; Fri, 19 May 2023 20:25:55 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0AOq3Ww0WgfV; Fri, 19 May 2023 20:25:55 +0200 (CEST) Received: from begin.home (apoitiers-658-1-118-253.w92-162.abo.wanadoo.fr [92.162.65.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 9381F2019D; Fri, 19 May 2023 20:25:55 +0200 (CEST) Received: from samy by begin.home with local (Exim 4.96) (envelope-from ) id 1q04nb-006TFL-0e; Fri, 19 May 2023 20:25:55 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Sergey Bugaev , commit-hurd@gnu.org Subject: [hurd,commited] hurd: Fix __TIMESIZE on x86_64 Date: Fri, 19 May 2023 20:25:50 +0200 Message-Id: <20230519182550.1542384-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" From: Sergey Bugaev We had sizeof (time_t) == 8, but __TIMESIZE == 32. Signed-off-by: Sergey Bugaev Message-Id: <20230519171516.3698754-1-bugaevc@gmail.com> --- sysdeps/mach/clock_gettime.c | 2 ++ sysdeps/mach/hurd/bits/timesize.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c index be775ed2bb..9124a32ef7 100644 --- a/sysdeps/mach/clock_gettime.c +++ b/sysdeps/mach/clock_gettime.c @@ -111,6 +111,7 @@ strong_alias (__clock_gettime, __clock_gettime_2); compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2); #endif +#if __TIMESIZE != 64 int __clock_gettime64 (clockid_t clock_id, struct __timespec64 *ts64) { @@ -124,3 +125,4 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *ts64) return ret; } libc_hidden_def (__clock_gettime64) +#endif diff --git a/sysdeps/mach/hurd/bits/timesize.h b/sysdeps/mach/hurd/bits/timesize.h index 900a0a237d..981452c026 100644 --- a/sysdeps/mach/hurd/bits/timesize.h +++ b/sysdeps/mach/hurd/bits/timesize.h @@ -16,5 +16,7 @@ License along with the GNU C Library; if not, see . */ +#include + /* Size in bits of the 'time_t' type of the default ABI. */ -#define __TIMESIZE 32 +#define __TIMESIZE __WORDSIZE