From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by sourceware.org (Postfix) with ESMTPS id D992F3858D37 for ; Fri, 3 Mar 2023 16:43:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D992F3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb2b.google.com with SMTP id k199so2527459ybf.4 for ; Fri, 03 Mar 2023 08:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677861798; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=s3Nf2t5jL7uctk/DY3amdnCBuHwPKn+l5UVzxrmD9Fg=; b=e6b6BYU8v9mc72+rubReF0l8aKe00QdzerLraME3mQMzeB9U/JUhudadEaRkPZdnNs d3SYt49uINV/2Lfp2EhcEKa3eGKm3RBpovSK088epQOnamoiwSfe3cVatOGmm4LxeE53 nPRl+k+D1FBPyGVHo1igN2Hcv7WuBVtgjD6KVvXyDoJF+Lpw/La1/0WB1bjsuAiqs+ua 5vtSEelxOTbJydvc8rUnVZ1AKQxE0tDymyw+20OGrnvdxOkEGdaMVBdKze0Yq94cYE1L 4UjQOtZu4ArAWh5toCLgkiHr3H0JXQjsAWaYYpKYpwz+t728zqz8f2gYP1VPUgKmA6Ds fKKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677861798; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s3Nf2t5jL7uctk/DY3amdnCBuHwPKn+l5UVzxrmD9Fg=; b=qfFWOCSswhKZtg5K4G56d3yieoGPY8fF5imUyd3jLy23MC4YnMhJt5C+u7CS+swcwz B2Rjauo2w3sW8qWpCPsP9Q4eLsHG3FyXXYKdy0gaT66XPb8dzd0Qggzcsbj22g0YayyA Cdw1RYv7pS/mb0oU/riSstGEhG/AZddbGunBMnt6JpJ+MIAObt72ZhzDNvP+G/f3t6JX czD+TxwR+QEPFEZbNjVWLu8N2+Z6tTkhRaGU1YvcWdV9NaP2aZjoV1xlgaKUZ5QkonyL cxif7WdxJzV5yYyDDyi1BBWm18NOCuU4heiJJ0lpkIkb54LEGYNDc25iwpxaK0NfnrsG jezA== X-Gm-Message-State: AO0yUKX28OZrM0IaAXwmlQ/BYBxxRu5/cJTbUzGsmZ2DQFm99hS5Ns1I 79NkR2SlSuSDJAsH2KH4RI044lk/ndG0yzmCnnc= X-Google-Smtp-Source: AK7set8g60A7OA2W70yS6Njf8/D/4Fe84e4IvvI8lvtPsc8tvgKY/wL8DKs+cukhrDF7rulwN2YrDC0s9eOPN/pRau4= X-Received: by 2002:a5b:647:0:b0:932:8dcd:3a13 with SMTP id o7-20020a5b0647000000b009328dcd3a13mr1340624ybq.5.1677861798138; Fri, 03 Mar 2023 08:43:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Kacper_Piwi=C5=84ski?= Date: Fri, 3 Mar 2023 17:43:07 +0100 Message-ID: Subject: Re: [PATCH] linux: fix ntp_gettime abi break To: Adhemerval Zanella Netto Cc: "Carlos O'Donell" , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: >From 64bbb7cc698c8e2c8d8c94247e0bc47ac3b18f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Piwi=C5=84ski?= Date: Wed, 22 Feb 2023 18:58:38 +0100 Subject: [PATCH] linux: fix ntp_gettime abi break --- sysdeps/unix/sysv/linux/ntp_gettime.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/ntp_gettime.c b/sysdeps/unix/sysv/linux/ntp_gettime.c index 4879573530..a577314636 100644 --- a/sysdeps/unix/sysv/linux/ntp_gettime.c +++ b/sysdeps/unix/sysv/linux/ntp_gettime.c @@ -40,7 +40,6 @@ __ntp_gettime64 (struct __ntptimeval64 *ntv) ntv->time = tntx.time; ntv->maxerror = tntx.maxerror; ntv->esterror = tntx.esterror; - ntv->tai = tntx.tai; return result; } @@ -54,7 +53,10 @@ __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 + ntv->time = valid_timeval64_to_timeval (ntv64.time); + ntv->maxerror = ntv64.maxerror; + ntv->esterror = ntv64.esterror; return result; } -- 2.34.1