pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rust: re-add a cast to workaround lossage for 32-bit ports.
Module Name: pkgsrc-wip
Committed By: Havard Eidnes <he%NetBSD.org@localhost>
Pushed By: he
Date: Mon Mar 20 14:37:47 2023 +0000
Changeset: 63d94493ff0e0222093f06c0e917df953d5554bd
Modified Files:
rust/distinfo
Added Files:
rust/patches/patch-library_std_src_sys_unix_thread__parking_netbsd.rs
Log Message:
rust: re-add a cast to workaround lossage for 32-bit ports.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=63d94493ff0e0222093f06c0e917df953d5554bd
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rust/distinfo | 1 +
...rary_std_src_sys_unix_thread__parking_netbsd.rs | 34 ++++++++++++++++++++++
2 files changed, 35 insertions(+)
diffs:
diff --git a/rust/distinfo b/rust/distinfo
index e792ccb67b..413efdb933 100644
--- a/rust/distinfo
+++ b/rust/distinfo
@@ -126,6 +126,7 @@ SHA1 (patch-library_backtrace_src_symbolize_gimli.rs) = 32ab8ea3809cd4f6fee9fc0d
SHA1 (patch-library_backtrace_src_symbolize_gimli_elf.rs) = 56621c10310914672a851cf5dfbf343a9ff4e1be
SHA1 (patch-library_std_src_sys_unix_mod.rs) = f8669d680f169137ac2891af2977909619366a97
SHA1 (patch-library_std_src_sys_unix_thread.rs) = 36a3085500ecbb34f8ecc08388c164da54bdf5d4
+SHA1 (patch-library_std_src_sys_unix_thread__parking_netbsd.rs) = c29eb1cf074766d34bd2b8c348ce29c6ae2ba163
SHA1 (patch-src_bootstrap_bootstrap.py) = fdb4e2e7fd61ae10f4f4b06ef895a8ebf47fbf7a
SHA1 (patch-src_bootstrap_builder.rs) = 98daac929d2bbc9c475c39d225d50d37491528a8
SHA1 (patch-src_bootstrap_compile.rs) = 94b05db59b8bc50dce48537aeb72ba9ce293bb07
diff --git a/rust/patches/patch-library_std_src_sys_unix_thread__parking_netbsd.rs b/rust/patches/patch-library_std_src_sys_unix_thread__parking_netbsd.rs
new file mode 100644
index 0000000000..57dcc19ec1
--- /dev/null
+++ b/rust/patches/patch-library_std_src_sys_unix_thread__parking_netbsd.rs
@@ -0,0 +1,34 @@
+$NetBSD$
+
+Try to cast to make this build, to avoid
+
+error[E0277]: the trait bound `i32: core::convert::From<u32>` is not satisfied
+ --> library/std/src/sys/unix/thread_parking/netbsd.rs:37:37
+ |
+37 | tv_nsec: dur.subsec_nanos().into(),
+ | ^^^^ the trait `core::convert::From<u32>` is not implemented for `i32`
+ |
+ = help: the following other types implement trait `core::convert::From<T>`:
+ <i32 as core::convert::From<NonZeroI32>>
+ <i32 as core::convert::From<bool>>
+ <i32 as core::convert::From<i16>>
+ <i32 as core::convert::From<i8>>
+ <i32 as core::convert::From<u16>>
+ <i32 as core::convert::From<u8>>
+ = note: required for `u32` to implement `core::convert::Into<i32>`
+
+For more information about this error, try `rustc --explain E0277`.
+
+This to un-break the 32-bit ports ... again.
+
+--- library/std/src/sys/unix/thread_parking/netbsd.rs.orig 2023-03-06 15:58:58.000000000 +0000
++++ library/std/src/sys/unix/thread_parking/netbsd.rs
+@@ -34,7 +34,7 @@ pub fn park_timeout(dur: Duration, hint:
+ // Saturate so that the operation will definitely time out
+ // (even if it is after the heat death of the universe).
+ tv_sec: dur.as_secs().try_into().ok().unwrap_or(time_t::MAX),
+- tv_nsec: dur.subsec_nanos().into(),
++ tv_nsec: (dur.subsec_nanos() as libc::c_long).into(),
+ };
+
+ // Timeout needs to be mutable since it is modified on NetBSD 9.0 and
Home |
Main Index |
Thread Index |
Old Index