mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
y2038: Introduce struct __ntptimeval64 - new internal glibc type
This type is a glibc's "internal" type to get time parameters data from Linux kernel (NTP daemon interface). It stores time in struct __timeval64 rather than struct timeval, which makes it Y2038-proof. Build tests: ./src/scripts/build-many-glibcs.py glibcs Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -32,6 +32,7 @@ libc_hidden_proto (__adjtimex)
|
|||||||
# define __timex64 timex
|
# define __timex64 timex
|
||||||
# define __clock_adjtime64 __clock_adjtime
|
# define __clock_adjtime64 __clock_adjtime
|
||||||
# define ___adjtimex64 ___adjtimex
|
# define ___adjtimex64 ___adjtimex
|
||||||
|
# define __ntptimeval64 ntptimeval
|
||||||
# else
|
# else
|
||||||
|
|
||||||
struct __timex64
|
struct __timex64
|
||||||
@ -77,6 +78,19 @@ extern int __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64);
|
|||||||
libc_hidden_proto (__clock_adjtime64);
|
libc_hidden_proto (__clock_adjtime64);
|
||||||
extern int ___adjtimex64 (struct __timex64 *tx64);
|
extern int ___adjtimex64 (struct __timex64 *tx64);
|
||||||
libc_hidden_proto (___adjtimex64)
|
libc_hidden_proto (___adjtimex64)
|
||||||
|
|
||||||
|
struct __ntptimeval64
|
||||||
|
{
|
||||||
|
struct __timeval64 time; /* current time (ro) */
|
||||||
|
long int maxerror; /* maximum error (us) (ro) */
|
||||||
|
long int esterror; /* estimated error (us) (ro) */
|
||||||
|
long int tai; /* TAI offset (ro) */
|
||||||
|
|
||||||
|
long int __glibc_reserved1;
|
||||||
|
long int __glibc_reserved2;
|
||||||
|
long int __glibc_reserved3;
|
||||||
|
long int __glibc_reserved4;
|
||||||
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Convert a known valid struct timex into a struct __timex64. */
|
/* Convert a known valid struct timex into a struct __timex64. */
|
||||||
|
Reference in New Issue
Block a user