[PATCH v2] linux: fix ntp_gettime abi break

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Mar 8 12:31:12 GMT 2023



On 08/03/23 07:53, Florian Weimer via Libc-alpha wrote:
> * Kacper Piwiński via Libc-alpha:
> 
>> From 57cfc759e3982ad591cf4d8c5f3392daf3799b3f Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Kacper=20Piwi=C5=84ski?= <vfjpl1@gmail.com>
>> Date: Wed, 8 Mar 2023 10:14:16 +0100
>> Subject: [PATCH v2] linux: fix ntp_gettime abi break
>>
>> Resolves #30156
> 
> Could you please reference the commit(s) which introduced the ABI change
> in the commit message?

You can use your initial commit message:

--
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 commits 5613afe9e3dff and b6ad64b907a (added for
64 bit time_t support), ntp_gettime start setting new fields.

Sets fields manually to maintain compatibility with v2.11 struct 
definition.
--


More information about the Libc-alpha mailing list