pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/inlyne
Module Name: pkgsrc
Committed By: wiz
Date: Thu Apr 9 08:56:34 UTC 2026
Modified Files:
pkgsrc/textproc/inlyne: distinfo
Added Files:
pkgsrc/textproc/inlyne/patches:
patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs
Log Message:
inlyne: fix build with rust 1.94
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/textproc/inlyne/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/textproc/inlyne/patches/patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/inlyne/distinfo
diff -u pkgsrc/textproc/inlyne/distinfo:1.8 pkgsrc/textproc/inlyne/distinfo:1.9
--- pkgsrc/textproc/inlyne/distinfo:1.8 Thu Feb 6 11:26:29 2025
+++ pkgsrc/textproc/inlyne/distinfo Thu Apr 9 08:56:34 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2025/02/06 11:26:29 pin Exp $
+$NetBSD: distinfo,v 1.9 2026/04/09 08:56:34 wiz Exp $
BLAKE2s (addr2line-0.24.2.crate) = 5bdb03ff8621c0993eda0ec3682c467ad3fc0015f48e46a70779bbd4bfbe8267
SHA512 (addr2line-0.24.2.crate) = 39cbec3c920ffc0f37584afb55e1cfe4f182e4415319a4e9bfe842360f102f7b9315f6171c0cf71ba0337123903e604096cd573fe98698a26c8eebc2376d965b
@@ -1746,3 +1746,4 @@ Size (zvariant_derive-4.2.0.crate) = 110
BLAKE2s (zvariant_utils-2.1.0.crate) = b142d63425365aedf109bafac551bf52a32897836b938d4835a415a0444db92c
SHA512 (zvariant_utils-2.1.0.crate) = 345b70d1106b37df41426efdb1ba49bf270e00898381c2a8021b5761c59efdea55def45cb2e2598b130b6cba8733503f3997a55578bca90867ab3e8f2346f80e
Size (zvariant_utils-2.1.0.crate) = 7043 bytes
+SHA1 (patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs) = e71a2029a0a094f195fa5d6b47caeecc9a94cda0
Added files:
Index: pkgsrc/textproc/inlyne/patches/patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs
diff -u /dev/null pkgsrc/textproc/inlyne/patches/patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs:1.1
--- /dev/null Thu Apr 9 08:56:34 2026
+++ pkgsrc/textproc/inlyne/patches/patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs Thu Apr 9 08:56:34 2026
@@ -0,0 +1,33 @@
+$NetBSD: patch-.._vendor_metrics-0.24.0_src_recorder_mod.rs,v 1.1 2026/04/09 08:56:34 wiz Exp $
+
+Fix build with rust 1.94.
+https://github.com/metrics-rs/metrics/commit/1e392834c2992236772f9f215b8d3c4bc7135076
+
+--- ../vendor/metrics-0.24.0/src/recorder/mod.rs.orig 2006-07-24 01:21:28.000000000 +0000
++++ ../vendor/metrics-0.24.0/src/recorder/mod.rs
+@@ -145,12 +139,19 @@ impl<'a> LocalRecorderGuard<'a> {
+
+ impl<'a> LocalRecorderGuard<'a> {
+ /// Creates a new `LocalRecorderGuard` and sets the thread-local recorder.
+- fn new(recorder: &'a dyn Recorder) -> Self {
+- // SAFETY: While we take a lifetime-less pointer to the given reference, the reference we
+- // derive _from_ the pointer is given the same lifetime of the reference
+- // used to construct the guard -- captured in the guard type itself --
+- // and so derived references never outlive the source reference.
+- let recorder_ptr = unsafe { NonNull::new_unchecked(recorder as *const _ as *mut _) };
++ fn new(recorder: &'a (dyn Recorder + 'a)) -> Self {
++ // SAFETY: We extend `'a` to `'static` to satisfy the signature of `LOCAL_RECORDER`, which
++ // has an implied `'static` bound on `dyn Recorder`. We enforce that all usages of `LOCAL_RECORDER`
++ // are limited to `'a` as we mediate its access entirely through `LocalRecorderGuard<'a>`.
++ let recorder_ptr = unsafe {
++ std::mem::transmute::<*const (dyn Recorder + 'a), *mut (dyn Recorder + 'static)>(
++ recorder as &'a (dyn Recorder + 'a),
++ )
++ };
++ // SAFETY: While we take a lifetime-less pointer to the given reference, the reference we derive _from_ the
++ // pointer is given the same lifetime of the reference used to construct the guard -- captured in the guard type
++ // itself -- and so derived references never outlive the source reference.
++ let recorder_ptr = unsafe { NonNull::new_unchecked(recorder_ptr) };
+
+ let prev_recorder =
+ LOCAL_RECORDER.with(|local_recorder| local_recorder.replace(Some(recorder_ptr)));
Home |
Main Index |
Thread Index |
Old Index