From patchwork Fri May 19 17:15:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 69693 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 CA4133858C78 for ; Fri, 19 May 2023 17:15:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA4133858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684516542; bh=6jP6JXULvZQDmdOYitpYFDjg4uZnj0aGLPaftoquKws=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=eZzt+MroT+ls0JswY8piYKBX1sr82luWumYTdMjmvmDb8P9xoVytuTNyPmct1pFzF uU/si01wPwxrXOvxKuOfNY9ovodUy+4rhNuIJXcXDPLBvvcT77+yy8jTM6NaaqC0zc cELYNEptiUDYS7oDQpfgWuAod1qbN0gO3hCCKmFA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 347633858C41 for ; Fri, 19 May 2023 17:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 347633858C41 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f27977aed6so3935223e87.2 for ; Fri, 19 May 2023 10:15:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684516518; x=1687108518; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6jP6JXULvZQDmdOYitpYFDjg4uZnj0aGLPaftoquKws=; b=ajYqn4xxuD2pKu2IRXQTGXa4C7IIgjKipAFYm0YQzsN6BcJLQTfHUqlpt9aIg0b104 POxsb9A0pGAspbSdlSW4sJbJpbKNmzmPyRKD3mxpV9e0ZRCVrFjPpb5M1MaDZspP8j1M xrdti4goT2VoS2NyyqcssSkOXyQsZd7ML2XyyZho50rgKuDmWxqhtE96B6q66aRevSd9 9fRoQDPYGzuJNWvYIRfrw6/dZFptBN1w4DYFIAcCXjEJrDJNjbimZljmiFrdGX7esLq3 PlMoCVXRu98pvYZBVODW4FxvOb4aCkV2+DEbNAeHEIpJxZXbWTdmAtFUczd7gnpWbYRM FUhg== X-Gm-Message-State: AC+VfDxpYmGlLYFKHBfFkWdUH4VEu0rh/7qlCY8p/96m1fn4Ov1e65yA Aa2tCspt/vKjOg97p/kmdaEFtpqOR1k= X-Google-Smtp-Source: ACHHUZ5z18QvoFe9vkIK/Mpine5wZfdozI7/VLZiQNRdZ5EBwoLj071f/auThe0zxzr9nGgvX+omlA== X-Received: by 2002:a05:6512:20d:b0:4f3:940d:abb with SMTP id a13-20020a056512020d00b004f3940d0abbmr1200303lfo.14.1684516517965; Fri, 19 May 2023 10:15:17 -0700 (PDT) Received: from surface-pro-6.. ([194.190.106.50]) by smtp.gmail.com with ESMTPSA id j22-20020a19f516000000b004edb0882ce7sm662956lfb.133.2023.05.19.10.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 10:15:17 -0700 (PDT) To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Samuel Thibault Subject: [PATCH] hurd: Fix __TIMESIZE on x86_64 Date: Fri, 19 May 2023 20:15:16 +0300 Message-Id: <20230519171516.3698754-1-bugaevc@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" We had sizeof (time_t) == 8, but __TIMESIZE == 32. Signed-off-by: Sergey Bugaev --- ...oops. I have not tested whether this breaks anything (other then checking that it still builds), but it's kind of amazing that it had worked at all before this, and there's a higher chance of this fixing something than breaking something. Unfortunately I believe this means that all binaries built for x86_64-gnu so far will have to be rebuilt. Fortunately I don't think anybody except for myself (and Samuel himself) had installed them. Discovered while attempting to hack on fcntl{,64,_time64}. sysdeps/mach/clock_gettime.c | 2 ++ sysdeps/mach/hurd/bits/timesize.h | 4 +++- sysdeps/mach/hurd/x86_64/libanl.abilist | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c index be775ed2..9124a32e 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 900a0a23..981452c0 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 diff --git a/sysdeps/mach/hurd/x86_64/libanl.abilist b/sysdeps/mach/hurd/x86_64/libanl.abilist index c0a6a009..baad6de2 100644 --- a/sysdeps/mach/hurd/x86_64/libanl.abilist +++ b/sysdeps/mach/hurd/x86_64/libanl.abilist @@ -1,4 +1,3 @@ GLIBC_2.38 gai_cancel F GLIBC_2.38 gai_error F -GLIBC_2.38 gai_suspend F GLIBC_2.38 getaddrinfo_a F