In a future release of the libc crate, libc::timespec will contain private padding fields on *-linux-musl targets and so the struct will no longer be able to be created using the literal initialization syntax.
Update struct literal use of libc::timespec to initialize to zero first and then manually update the appropriate fields. Also updates a raw syscall to use the libc function instead as on musl 1.2, it correctly handles libc::timespec values which, in musl 1.2, are always 16 bytes in length regardless of platform.
In a future release of the
libc
crate,libc::timespec
will contain private padding fields on*-linux-musl
targets and so the struct will no longer be able to be created using the literal initialization syntax.Update struct literal use of
libc::timespec
to initialize to zero first and then manually update the appropriate fields. Also updates a raw syscall to use the libc function instead as on musl 1.2, it correctly handleslibc::timespec
values which, in musl 1.2, are always 16 bytes in length regardless of platform.See also https://github.com/rust-lang/libc/pull/2088