From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 412F63858C53 for ; Thu, 2 Mar 2023 17:47:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 412F63858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677779245; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X9dyHgzZriAUAGN+5LwZaB2UAXtKxbrIxAYXZmYZP6E=; b=iLbwKUcEfb9OnVQoOK3Obp8M9EXcUsxWO/OtlbBjM163hhosGdfQqIHIydKEskzIkSQWb/ blqDLPfYpiMYqUsNWkWGihpKMH0wY6GzVMgJXaiSBHUT3vwNxkOoPALuruMCkEZVu2X0io KELsXJdj9pAD1J4F6KXBE038pRkuRo8= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-13-1FOS7NEGOCCY18mnu2_ITg-1; Thu, 02 Mar 2023 12:47:24 -0500 X-MC-Unique: 1FOS7NEGOCCY18mnu2_ITg-1 Received: by mail-io1-f71.google.com with SMTP id m25-20020a6bea19000000b0074cc271437bso10833044ioc.1 for ; Thu, 02 Mar 2023 09:47:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677779243; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X9dyHgzZriAUAGN+5LwZaB2UAXtKxbrIxAYXZmYZP6E=; b=v/09PN9iWvdE1DECd93sjvm0rFy5yl+lGlVT+xIcRBpQu7K9nW9M5yFucuKdm46n7b QVHs1DvvklRp3pnhpL50MkJC7Qhte1k4dnAVKOK2/HG2kPJNCqCjqINmxMzgy4hBBNOj jK204cqmdiEeLekjIqy6OFvNhDOAf8j9+WVJX8HlvDzflEtCi1E9zRwIcQjzD4uHe2Dy xMPO/ALWRtZMpUYxHLYmeoa4eb9ZHTbgEfgu8H4u68j7xcwgMz7lhxSbVXMkqblfnP4g gjdv6YS6gb0FzARDtLdcZxTOAK9M7sKaCdJe+XrdRbelCAa8PKVj6JfhmBONIdSqSrcQ zPiw== X-Gm-Message-State: AO0yUKUonkzu4o/0gGZPQXJEzkI/qEjmrp+tWpE5pgGbiinSN6JwS0wX efKCmBNEkaK/l8CTnCtLLiHnSixb2hr2EH/At2ZZ1c3tR2Vu1kiwcCO1UDruRgsJMGDpYMnLXCr 90f8VKZwr/svhSk3rPJfM4jqj2w== X-Received: by 2002:a05:6602:88:b0:74c:7f3d:10d2 with SMTP id h8-20020a056602008800b0074c7f3d10d2mr7668350iob.12.1677779243418; Thu, 02 Mar 2023 09:47:23 -0800 (PST) X-Google-Smtp-Source: AK7set9Zrz1uLBszA7W3xqLCKGFqnPODlOOc3xRW1+nakgduay+MZ9aOqqNGg/2OHiv17WlOs3RW7Q== X-Received: by 2002:a05:6602:88:b0:74c:7f3d:10d2 with SMTP id h8-20020a056602008800b0074c7f3d10d2mr7668343iob.12.1677779243102; Thu, 02 Mar 2023 09:47:23 -0800 (PST) Received: from [192.168.0.241] ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id x20-20020a6bda14000000b00745a82f892bsm29874iob.15.2023.03.02.09.47.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Mar 2023 09:47:22 -0800 (PST) Message-ID: Date: Thu, 2 Mar 2023 12:47:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] linux: fix ntp_gettime abi break To: =?UTF-8?Q?Kacper_Piwi=c5=84ski?= , libc-alpha@sourceware.org References: From: Carlos O'Donell Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/20/23 23:04, Kacper Piwiński via Libc-alpha wrote: > Between versions v2.11 and v2.12 struct ntptimeval got new fields. > That wasn't a problem because new function ntp_gettimex was created > (and made default) to support new struct. Old ntp_gettime was not > using new fields so it was safe to call with old struct > definition. Then between versions v2.31 and v2.32 when working on > y2038 bugs, ntp_gettime start setting new fields. > > Sets fields manually to maintain compatibility with v2.11 struct definition. The patch fails to apply. This fails pre-commit CI: https://patchwork.sourceware.org/project/glibc/patch/CAKVti-BRav=mmfcQBEz_qpezmKfR_fFW9uihJb+QXiJazugTmA@mail.gmail.com/ Please have a look at: https://sourceware.org/glibc/wiki/Contribution%20checklist Did you generate the patch with `git format-patch`? > > Author: Kacper Piwiński > --- > sysdeps/unix/sysv/linux/ntp_gettime.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/sysdeps/unix/sysv/linux/ntp_gettime.c > b/sysdeps/unix/sysv/linux/ntp_gettime.c > index 4879573530..3844b2e487 100644 > --- a/sysdeps/unix/sysv/linux/ntp_gettime.c > +++ b/sysdeps/unix/sysv/linux/ntp_gettime.c > @@ -54,7 +54,11 @@ __ntp_gettime (struct ntptimeval *ntv) > int result; > > result = __ntp_gettime64 (&ntv64); > - *ntv = valid_ntptimeval64_to_ntptimeval (ntv64); > + //manually update fields to maintain abi with v2.11 struct definition > + struct ntptimeval tntv = valid_ntptimeval64_to_ntptimeval (ntv64); > + ntv->time = tntv.time; > + ntv->maxerror = tntv.maxerror; > + ntv->esterror = tntv.esterror; > > return result; > } > -- > 2.38.1.windows.1 > -- Cheers, Carlos.