Skip to content
  • Alexander Kanavin's avatar
    time: use dbus_int64_t for seconds instead of long · 4c658af0
    Alexander Kanavin authored
    
    
    On 32 bit systems long will overflow in 2038, causing complete breakage.
    This is confirmed by running dbus's test suite on a 32 bit system
    with system time set to 2040 (and configured to use 64 bit time_t of course).
    
    Note that both timespec and timeval are specified with time_t for the
    seconds component. This should propagate everywhere where that data is
    passed and stored, but previously _dbus_get_monotonic_time() and
    _dbus_get_monotonic_time() would truncate it to long.
    
    Also add a function for parsing dbus_int64_t from
    files, as existing functions can only handle long.
    
    Signed-off-by: default avatarAlexander Kanavin <alex@linutronix.de>
    4c658af0