32-bit musl with a 64-bit time_t pads struct timespec, so the field-by-field literals do not compile there. From Alpine's community/firefox time64.patch by Aelin , minus the wgpu-hal hunk, which upstream has taken. libc derives Default for timespec on every target, so this needs no guard. --- a/third_party/rust/alsa/src/pcm.rs +++ b/third_party/rust/alsa/src/pcm.rs @@ -1110,19 +1110,19 @@ fn ptr(&self) -> *mut alsa::snd_pcm_status_t { self.0.as_ptr() as *const _ as *mut alsa::snd_pcm_status_t } pub fn get_htstamp(&self) -> timespec { - let mut h = timespec {tv_sec: 0, tv_nsec: 0}; + let mut h = timespec::default(); unsafe { alsa::snd_pcm_status_get_htstamp(self.ptr(), &mut h) }; h } pub fn get_trigger_htstamp(&self) -> timespec { - let mut h = timespec {tv_sec: 0, tv_nsec: 0}; + let mut h = timespec::default(); unsafe { alsa::snd_pcm_status_get_trigger_htstamp(self.ptr(), &mut h) }; h } pub fn get_audio_htstamp(&self) -> timespec { - let mut h = timespec {tv_sec: 0, tv_nsec: 0}; + let mut h = timespec::default(); unsafe { alsa::snd_pcm_status_get_audio_htstamp(self.ptr(), &mut h) }; h } --- a/third_party/rust/zeitstempel/src/unix.rs +++ b/third_party/rust/zeitstempel/src/unix.rs @@ -12,10 +12,7 @@ /// /// [`clock_gettime`]: https://manpages.debian.org/buster/manpages-dev/clock_gettime.3.en.html pub fn now_including_suspend() -> u64 { - let mut ts = libc::timespec { - tv_sec: 0, - tv_nsec: 0, - }; + let mut ts = libc::timespec::default(); unsafe { libc::clock_gettime(libc::CLOCK_BOOTTIME, &mut ts); } @@ -32,10 +29,7 @@ /// [`clock_gettime`]: https://manpages.debian.org/buster/manpages-dev/clock_gettime.3.en.html /// [`FreeBSD clock_gettime`]: https://man.freebsd.org/cgi/man.cgi?query=clock_gettime&manpath=FreeBSD+15.0-RELEASE pub fn now_awake() -> u64 { - let mut ts = libc::timespec { - tv_sec: 0, - tv_nsec: 0, - }; + let mut ts = libc::timespec::default(); #[cfg(any(target_os = "linux", target_os = "android"))] let clock = libc::CLOCK_MONOTONIC; #[cfg(target_os = "freebsd")] .