Ask questionsmusl: Change `time_t` definition on 32-bit targets according to "time64"

time_t is defined as c_long on musl: and c_long is i32 on 32-bit targets: But the time_t definition has been changed to 64-bit by, 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. cc #1846


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.


Related questions

Add TCP FastOpen support for macOS - libc hot 1
Github User Rank List