32 bit time_t

Gary E. Miller gem at rellim.com
Thu Apr 20 17:08:39 UTC 2017


Yo Achim!

On Thu, 20 Apr 2017 09:11:37 +0200
Achim Gratz <Stromeko at Nexgo.DE> wrote:

> Am 19.04.2017 um 20:38 schrieb Gary E. Miller:
> > Gentoo stable on RasPi has 32 bit time_t:
> > 
> > Checking sizeof long                                            : 4
> > Checking sizeof time_t (time.h)                                 :
> > 4  
> 
> This is a 32bit glibc based system, so this means you didn't ask for
> a 64bit time_t, then.  Here's that link again that tells you how
> glibc handles this:

Yes, but...  The real problem for ntpd on 32-bit is that clock_gettime()
and clock_settime() use timespec which uses time_t.  So while time64_t
is available, it is not used on the path that we need it.

> The Linux kernel itself is not Y2038 clean yet, AFAIK.  But that's no 
> excuse for applications to skimp there.

For our purposes, which are mostly clock_gettime)( and clock_gettime(),
the Linux kernel suits our purposes since May 2014.  At that time, with
64 bit kernels, time_t became 8 bytes.  So then timespec, using time_t,
is really using time64_t, and ntpd works just fine.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170420/5a1de0d9/attachment.bin>


More information about the devel mailing list