From 028fe668ae12ba3c8fec833778c31f6d5b6d318b Mon Sep 17 00:00:00 2001 From: Aelin Date: Wed, 24 Jun 2026 17:36:25 +0200 Subject: [PATCH] time64 compile fixes --- third_party/rust/alsa/src/pcm.rs | 6 +++--- third_party/rust/wgpu-hal/src/vulkan/adapter.rs | 5 +---- third_party/rust/zeitstempel/src/unix.rs | 10 ++-------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/third_party/rust/alsa/src/pcm.rs b/third_party/rust/alsa/src/pcm.rs index 16569b7..ca3517b 100644 --- a/third_party/rust/alsa/src/pcm.rs +++ b/third_party/rust/alsa/src/pcm.rs @@ -1110,19 +1110,19 @@ impl Status { 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 } diff --git a/third_party/rust/zeitstempel/src/unix.rs b/third_party/rust/zeitstempel/src/unix.rs index d2db5c6..874047b 100644 --- a/third_party/rust/zeitstempel/src/unix.rs +++ b/third_party/rust/zeitstempel/src/unix.rs @@ -12,10 +12,7 @@ fn timespec_to_ns(ts: libc::timespec) -> u64 { /// /// [`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 @@ pub fn now_including_suspend() -> u64 { /// [`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(any(target_os = "freebsd", target_os = "openbsd"))]