There has been an effort over the last few years to add support for 64-bit time on 32-bit systems. glibc now offers a "dual ABI" where both 32-bit and 64-bit time are now available in the same glibc, and are chosen by a conditional define. This is disabled by default in upsteam glibc, but enabled by default by some distros on some architectures (specifically debian trixie and newer and ubuntu 24.04 and newer enable it by default on 32-bit arm systems).
The rust libc crate now has support for 64-bit time, it's currently disabled by default in the upstream crate, but we have a patch to enable it by default on appropriate architectures in the Debian rust-libc package.
Unfortunately, enabling time64 support adds extra padding fields to some data structures, notablly struct timespec. This is largely a non-issue for C code which can just ignore the padding fields, but for rust code it means that on 32-bit systems with 64-bit time the structures cannot be created with struct literal syntax and must instead be constructed with mem::zeroed.
You can test building with 64-bit time enabled on a 32-bit system by setting the environment variable RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64, unfortunately right now that fails before getting to your crate. Hopefully we can fix that in time.
Anyway, our patch is available at https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/cntr/debian/patches/fix-libc-timespec.patch
note: we have been carrying this patch in Debian for some time, but I waited to submit it upstream until the rust-libc patches were merged upstream.
There has been an effort over the last few years to add support for 64-bit time on 32-bit systems. glibc now offers a "dual ABI" where both 32-bit and 64-bit time are now available in the same glibc, and are chosen by a conditional define. This is disabled by default in upsteam glibc, but enabled by default by some distros on some architectures (specifically debian trixie and newer and ubuntu 24.04 and newer enable it by default on 32-bit arm systems).
The rust libc crate now has support for 64-bit time, it's currently disabled by default in the upstream crate, but we have a patch to enable it by default on appropriate architectures in the Debian rust-libc package.
Unfortunately, enabling time64 support adds extra padding fields to some data structures, notablly struct timespec. This is largely a non-issue for C code which can just ignore the padding fields, but for rust code it means that on 32-bit systems with 64-bit time the structures cannot be created with struct literal syntax and must instead be constructed with mem::zeroed.
You can test building with 64-bit time enabled on a 32-bit system by setting the environment variable RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64, unfortunately right now that fails before getting to your crate. Hopefully we can fix that in time.
Anyway, our patch is available at https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/cntr/debian/patches/fix-libc-timespec.patch
note: we have been carrying this patch in Debian for some time, but I waited to submit it upstream until the rust-libc patches were merged upstream.