Ask questionsmusl: Change `time_t` definition on 32-bit targets according to "time64"
time_t is defined as
c_long on musl:
i32 on 32-bit targets:
time_t definition has been changed to 64-bit by https://github.com/bminor/musl/commit/38143339646a4ccce8afe298c34467767c899f51, since musl 1.2.0.
We will change our type to i64 on 32-bit targets as well at some point but we should announce it before changing.
Answer questions mahkoh
Isn't this broken either way as soon as C libraries are involved or am I missing something?
As documented in time64.html, C code compiled against >=1.2 assumes time_t = i64 whereas code compiled against <1.2 assumes time_t = i32 on 32 bit systems. If you use a C library that uses time_t in its interface (e.g. openssl), the time_t used by rust code must have the same size as in the musl headers.