git: 58ce4ed5b454 - main - audio/lewton: : Fix build with rust 1.89.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 Sep 2025 08:26:04 UTC
The branch main has been updated by mikael:
URL: https://cgit.FreeBSD.org/ports/commit/?id=58ce4ed5b45408133fc662b1bccbe1b34f1d28fe
commit 58ce4ed5b45408133fc662b1bccbe1b34f1d28fe
Author: Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-08-25 11:57:37 +0000
Commit: Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-09-01 08:24:04 +0000
audio/lewton: : Fix build with rust 1.89.0
error: implicit autoref creates a reference to the dereference of a raw pointer
--> src/capi.rs:125:2
error: implicit autoref creates a reference to the dereference of a raw pointer
--> src/capi.rs:133:2
PR: 288923
Approved by: portmgr (build fix blanket)
---
audio/lewton/files/patch-rust-1.89.0 | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/audio/lewton/files/patch-rust-1.89.0 b/audio/lewton/files/patch-rust-1.89.0
new file mode 100644
index 000000000000..49869710a43a
--- /dev/null
+++ b/audio/lewton/files/patch-rust-1.89.0
@@ -0,0 +1,18 @@
+--- src/capi.rs.orig 2025-08-23 11:38:26 UTC
++++ src/capi.rs
+@@ -120,6 +120,7 @@ pub unsafe extern fn lewton_decode_packet(ctx :*mut Le
+ }
+
+ /// Provide the number of samples present in each channel
++#[warn(dangerous_implicit_autorefs)]
+ #[no_mangle]
+ pub unsafe extern fn lewton_samples_count(samples :*const LewtonSamples) -> usize {
+ (*samples).0
+@@ -129,6 +130,7 @@ pub unsafe extern fn lewton_samples_count(samples :*co
+ }
+
+ /// Provide a reference to the channel sample data
++#[warn(dangerous_implicit_autorefs)]
+ pub unsafe extern fn lewton_samples_f32(samples :*const LewtonSamples, channel :usize) -> *const f32 {
+ (*samples).0
+ .get(channel)