aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fselect
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-02-02 13:46:04 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-02-02 13:46:04 +0000
commit91c0d1c49f9f31c2122aca54b822535f0f94c630 (patch)
tree67146f2cd8ac66ec967246314c23a06232598b67 /sysutils/fselect
parent19ca79a76acec400a96d8dd3dd14fdc8aaad35d0 (diff)
downloadports-91c0d1c49f9f31c2122aca54b822535f0f94c630.tar.gz
ports-91c0d1c49f9f31c2122aca54b822535f0f94c630.zip
sysutils/fselect: add upstream commit that fixes armv7
It also fixes build on powerpc.
Diffstat (limited to 'sysutils/fselect')
-rw-r--r--sysutils/fselect/files/patch-cargo-crates_rustix-0.34.6_src_imp_libc_net_syscalls.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysutils/fselect/files/patch-cargo-crates_rustix-0.34.6_src_imp_libc_net_syscalls.rs b/sysutils/fselect/files/patch-cargo-crates_rustix-0.34.6_src_imp_libc_net_syscalls.rs
new file mode 100644
index 000000000000..b15774f12d70
--- /dev/null
+++ b/sysutils/fselect/files/patch-cargo-crates_rustix-0.34.6_src_imp_libc_net_syscalls.rs
@@ -0,0 +1,20 @@
+--- cargo-crates/rustix-0.34.6/src/imp/libc/net/syscalls.rs.orig 2023-02-02 13:18:53 UTC
++++ cargo-crates/rustix-0.34.6/src/imp/libc/net/syscalls.rs
+@@ -548,11 +548,12 @@ pub(crate) mod sockopt {
+ return Err(io::Error::INVAL);
+ }
+
+- let tv_sec = timeout.as_secs().try_into();
+- #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
+- let tv_sec = tv_sec.unwrap_or(c::c_long::MAX);
+- #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
+- let tv_sec = tv_sec.unwrap_or(i64::MAX);
++ // Rust's musl libc bindings deprecated `time_t` while they
++ // transition to 64-bit `time_t`. What we want here is just
++ // "whatever type `timeval`'s `tv_sec` is", so we're ok using
++ // the deprecated type.
++ #[allow(deprecated)]
++ let tv_sec = timeout.as_secs().try_into().unwrap_or(c::time_t::MAX);
+
+ // `subsec_micros` rounds down, so we use `subsec_nanos` and
+ // manually round up.