Skip to content

clock: Fix 32 bit assertions in GST_TIME_TO_TIMEVAL and GST_TIME_TO_TIMESPEC

On various 32 bit systems, time_t is actually 64 bits while long is still only 32 bits. The macro would wrongly trigger its assertion in this case if a value with more than 68 years worth of seconds is converted.

Examples are various newer 32 bit platforms and old ones that are compiled with -D_TIME_BITS=64.

Also statically assert that time_t is either 32 or 64 bits. Other values might need adjustments in the macro.

Merge request reports