You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On platforms with 32-bit long and the usual Unix time epoch of Jan 1, 1970, this will suffer from the Year 2038 problem even if the platform uses a 64-bit time_t.
The C standard declares the tv_sec member to be of type time_t, so it should be sufficient to replace the conversion (long)(s) with (time_t)(s) (assuming time_t is an integer type because the existing code already assumes that!).
The text was updated successfully, but these errors were encountered:
timespec_from_double
has this initialized variable:On platforms with 32-bit
long
and the usual Unix time epoch of Jan 1, 1970, this will suffer from the Year 2038 problem even if the platform uses a 64-bittime_t
.The C standard declares the
tv_sec
member to be of typetime_t
, so it should be sufficient to replace the conversion(long)(s)
with(time_t)(s)
(assumingtime_t
is an integer type because the existing code already assumes that!).The text was updated successfully, but these errors were encountered: