GNU C Library Lands Year 2038 Handling For Legacy ABIs

Written by Michael Larabel in GNU on 16 June 2021 at 12:00 AM EDT. 24 Comments
The GNU C Library (Glibc) saw another batch of Year 2038 "Y2038" preparations on Tuesday for the Unix timestamp for when the time since 1 January 1970 can no longer be stored in a signed 32-bit integer.

There were several Y2038 patches to be merged to Glibc in the past day but ultimately the main highlight is support for 64-bit time with the legacy ABIs.

As explained by Linaro's Adhemerval Zanella, "A new build flag, _TIME_BITS, enables the usage of the newer 64-bit
time symbols for legacy ABI (where 32-bit time_t is default). The 64 bit time support is only enabled if LFS (_FILE_OFFSET_BITS=64) is also used. Different than LFS support, the y2038 symbols are added only for the required ABIs (armhf, csky, hppa, i386, m68k, microblaze, mips32, mips64-n32, nios2, powerpc32, sparc32, s390-32, and sh). The ABIs with 64-bit time support are unchanged, both for symbol and types redirection. On Linux the full 64-bit time support requires a minimum of kernel version v5.1. Otherwise, the 32-bit fallbacks are used and might results in error with overflow return code (EOVERFLOW).

The redirections for handling 64-bit time are added for fstat, gettimeofday, mktime, nanosleep, select, stat, time, utime, and many other libc calls as well as for librt and libanl.

With recent versions of the Linux kernel and other key user-space software components, the Year 2038 handling is in relatively good shape and now this Glibc work for proper handling with the legacy ABIs now more thoroughly handles it. There is still seventeen years to go until the "Epochalypse" but particularly on the embedded front it remains to be seen how many systems/hardware will be updated by the vendor to the mitigate the issue.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week