projects/aports·blob master · refs

68 lines · 2.6 KiB

1From 028fe668ae12ba3c8fec833778c31f6d5b6d318b Mon Sep 17 00:00:00 2001
2From: Aelin <[email protected]>
3Date: Wed, 24 Jun 2026 17:36:25 +0200
4Subject: [PATCH] time64 compile fixes
5
6---
7 third_party/rust/alsa/src/pcm.rs | 6 +++---
8 third_party/rust/zeitstempel/src/unix.rs | 10 ++--------
9 2 files changed, 5 insertions(+), 11 deletions(-)
10
11diff --git a/third_party/rust/alsa/src/pcm.rs b/third_party/rust/alsa/src/pcm.rs
12index 16569b7ec9..ca3517b23c 100644
13--- a/third_party/rust/alsa/src/pcm.rs
14+++ b/third_party/rust/alsa/src/pcm.rs
15@@ -1110,19 +1110,19 @@ impl Status {
16 fn ptr(&self) -> *mut alsa::snd_pcm_status_t { self.0.as_ptr() as *const _ as *mut alsa::snd_pcm_status_t }
17
18 pub fn get_htstamp(&self) -> timespec {
19- let mut h = timespec {tv_sec: 0, tv_nsec: 0};
20+ let mut h = timespec::default();
21 unsafe { alsa::snd_pcm_status_get_htstamp(self.ptr(), &mut h) };
22 h
23 }
24
25 pub fn get_trigger_htstamp(&self) -> timespec {
26- let mut h = timespec {tv_sec: 0, tv_nsec: 0};
27+ let mut h = timespec::default();
28 unsafe { alsa::snd_pcm_status_get_trigger_htstamp(self.ptr(), &mut h) };
29 h
30 }
31
32 pub fn get_audio_htstamp(&self) -> timespec {
33- let mut h = timespec {tv_sec: 0, tv_nsec: 0};
34+ let mut h = timespec::default();
35 unsafe { alsa::snd_pcm_status_get_audio_htstamp(self.ptr(), &mut h) };
36 h
37 }
38diff --git a/third_party/rust/zeitstempel/src/unix.rs b/third_party/rust/zeitstempel/src/unix.rs
39index 5385d822d6..8d45e4e00c 100644
40--- a/third_party/rust/zeitstempel/src/unix.rs
41+++ b/third_party/rust/zeitstempel/src/unix.rs
42@@ -12,10 +12,7 @@ fn timespec_to_ns(ts: libc::timespec) -> u64 {
43 ///
44 /// [`clock_gettime`]: https://manpages.debian.org/buster/manpages-dev/clock_gettime.3.en.html
45 pub fn now_including_suspend() -> u64 {
46- let mut ts = libc::timespec {
47- tv_sec: 0,
48- tv_nsec: 0,
49- };
50+ let mut ts = libc::timespec::default();
51 unsafe {
52 libc::clock_gettime(libc::CLOCK_BOOTTIME, &mut ts);
53 }
54@@ -32,10 +29,7 @@ pub fn now_including_suspend() -> u64 {
55 /// [`clock_gettime`]: https://manpages.debian.org/buster/manpages-dev/clock_gettime.3.en.html
56 /// [`FreeBSD clock_gettime`]: https://man.freebsd.org/cgi/man.cgi?query=clock_gettime&manpath=FreeBSD+15.0-RELEASE
57 pub fn now_awake() -> u64 {
58- let mut ts = libc::timespec {
59- tv_sec: 0,
60- tv_nsec: 0,
61- };
62+ let mut ts = libc::timespec::default();
63 #[cfg(any(target_os = "linux", target_os = "android"))]
64 let clock = libc::CLOCK_MONOTONIC;
65 #[cfg(target_os = "freebsd")]
66--
672.55.0
68