From: Albert ARIBAUD (3ADEV) Date: Thu, 7 Sep 2017 22:42:15 +0000 (+0200) Subject: Y2038: add struct __timex64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9a19a386245ebcfa78309709fd6394a45292601;p=thirdparty%2Fglibc.git Y2038: add struct __timex64 --- diff --git a/include/time.h b/include/time.h index 5ea0aa33031..5bca4c14151 100644 --- a/include/time.h +++ b/include/time.h @@ -4,6 +4,7 @@ #ifndef _ISOMAC # include # include +# include # include extern __typeof (strftime_l) __strftime_l; @@ -32,6 +33,36 @@ libc_hidden_proto (__mktime64) libc_hidden_proto (__timelocal64) #endif +/* 64-bit time version of the current struct timex */ +struct __timex64 +{ + unsigned int modes; /* mode selector */ + __syscall_slong_t offset; /* time offset (usec) */ + __syscall_slong_t freq; /* frequency offset (scaled ppm) */ + __syscall_slong_t maxerror; /* maximum error (usec) */ + __syscall_slong_t esterror; /* estimated error (usec) */ + int status; /* clock command/status */ + __syscall_slong_t constant; /* pll time constant */ + __syscall_slong_t precision; /* clock precision (usec) (ro) */ + __syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */ + struct __timeval64 time; /* (read only, except for ADJ_SETOFFSET) */ + __syscall_slong_t tick; /* (modified) usecs between clock ticks */ + __syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */ + __syscall_slong_t jitter; /* pps jitter (us) (ro) */ + int shift; /* interval duration (s) (shift) (ro) */ + __syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */ + __syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */ + __syscall_slong_t calcnt; /* calibration intervals (ro) */ + __syscall_slong_t errcnt; /* calibration errors (ro) */ + __syscall_slong_t stbcnt; /* stability limit exceeded (ro) */ + + int tai; /* TAI offset (ro) */ + + /* ??? */ + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; extern __typeof (clock_getres) __clock_getres; extern __typeof (clock_gettime) __clock_gettime; diff --git a/time/Makefile b/time/Makefile index a502c8d04f4..d054bb9b7c4 100644 --- a/time/Makefile +++ b/time/Makefile @@ -28,6 +28,8 @@ headers := time.h sys/time.h sys/timeb.h bits/time.h \ bits/types/struct_timespec.h bits/types/struct_timeval.h \ bits/types/struct_tm.h bits/types/timer_t.h \ bits/types/time_t.h \ + bits/types/struct_timespec64.h> \ + bits/types/struct_timeval64.h> \ routines := offtime asctime clock ctime ctime_r difftime \ gmtime localtime mktime time \