[0/6] y2038: Convert settimeofday to be Y2038 safe
mbox series

Message ID 20200118072047.23071-1-lukma@denx.de
Headers show
Series
  • y2038: Convert settimeofday to be Y2038 safe
Related show

Message

Lukasz Majewski Jan. 18, 2020, 7:20 a.m. UTC
In this patch series the settimeofday undergoes some rework to internally use
__clock_settime64, which now supports 64 bit time (even on machines with
__TIMESIZE != 64).

It is now possible to use settimeofday in Y2038 systems (when proper redirection
is used).

To allow this conversion it was necessary to modify some alpha code and 
# include <sys/time.h> in ./include/time.h

The repository with Y2038 supprt (which uses this work)
https://github.com/lmajewski/y2038_glibc/commits/glibc_settimeofday_64bit_conversion_v1

Lukasz Majewski (6):
  y2038: Use __clock_settime64 in deprecated stime function
  y2038: hurd: Provide __clock_settime64 function
  y2038: Introduce struct __timeval64 - new internal glibc type
  y2038: alpha: Rename valid_timeval_to_timeval64 to
    valid_timeval32_to_timeval
  y2038: Provide conversion helpers for struct __timeval64
  y2038: linux: Provide __settimeofday64 implementation

 include/time.h                                | 59 +++++++++++++++++++
 sysdeps/mach/hurd/clock_settime.c             |  9 +++
 sysdeps/unix/sysv/linux/alpha/osf_adjtime.c   |  4 +-
 sysdeps/unix/sysv/linux/alpha/osf_setitimer.c |  4 +-
 sysdeps/unix/sysv/linux/alpha/osf_utimes.c    |  4 +-
 sysdeps/unix/sysv/linux/alpha/tv32-compat.h   |  2 +-
 time/settimeofday.c                           | 19 ++++--
 time/stime.c                                  |  4 +-
 8 files changed, 92 insertions(+), 13 deletions(-)