Date: Fri, 26 Jun 2026 12:09:34 +0000 From: Robert Clausecker <fuz@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 379fd8b72257 - main - net/sniffnet: fix build on armv7 Message-ID: <6a3e6bfe.3e483.11a195b4@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=379fd8b722576e2f665add52cc70f445ca15205a commit 379fd8b722576e2f665add52cc70f445ca15205a Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2026-06-22 21:51:14 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-06-26 12:07:54 +0000 net/sniffnet: fix build on armv7 The usual issue of time_t being 64 bits on armv7 despite it being a 32 bit platform. Refactor the time conversion code to just use i64 throughout, avoiding any type conversion issues. Approved by: portmgr (build fix blanket) See also: 0c9905d54dedcf8763df802a01beb2ea3d4ac4a0 MFH: 2026Q2 --- .../patch-cargo-crates_cpal-0.17.3_src_host_alsa_mod.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/net/sniffnet/files/patch-cargo-crates_cpal-0.17.3_src_host_alsa_mod.rs b/net/sniffnet/files/patch-cargo-crates_cpal-0.17.3_src_host_alsa_mod.rs new file mode 100644 index 000000000000..59720d90f687 --- /dev/null +++ b/net/sniffnet/files/patch-cargo-crates_cpal-0.17.3_src_host_alsa_mod.rs @@ -0,0 +1,15 @@ +--- cargo-crates/cpal-0.17.3/src/host/alsa/mod.rs.orig 2026-06-22 08:56:54 UTC ++++ cargo-crates/cpal-0.17.3/src/host/alsa/mod.rs +@@ -1106,11 +1106,8 @@ fn timespec_to_nanos(ts: libc::timespec) -> i64 { + // https://fossies.org/linux/alsa-lib/test/audio_time.c + #[inline] + fn timespec_to_nanos(ts: libc::timespec) -> i64 { +- let nanos = ts.tv_sec * 1_000_000_000 + ts.tv_nsec; +- #[cfg(target_pointer_width = "64")] ++ let nanos = ts.tv_sec as i64 * 1_000_000_000 + ts.tv_nsec as i64; + return nanos; +- #[cfg(not(target_pointer_width = "64"))] +- return nanos.into(); + } + + // Adapted from `timediff` here:home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3e6bfe.3e483.11a195b4>
