Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2023 19:04:54 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d08329910057 - main - x11/eww: fix build on powerpc
Message-ID:  <202303141904.32EJ4sb3021922@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d0832991005786e302898bc727cf74cb1c7cb9e7

commit d0832991005786e302898bc727cf74cb1c7cb9e7
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-14 19:04:09 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-14 19:04:09 +0000

    x11/eww: fix build on powerpc
    
    Merges https://gitlab.com/rust-kqueue/rust-kqueue/-/commit/41ea02d22be789373fd630731d34dd9419cd7d26 from upstream.
---
 .../patch-cargo-crates_kqueue-1.0.6_src_time.rs    | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/x11/eww/files/patch-cargo-crates_kqueue-1.0.6_src_time.rs b/x11/eww/files/patch-cargo-crates_kqueue-1.0.6_src_time.rs
new file mode 100644
index 000000000000..57d3f86795e6
--- /dev/null
+++ b/x11/eww/files/patch-cargo-crates_kqueue-1.0.6_src_time.rs
@@ -0,0 +1,42 @@
+--- cargo-crates/kqueue-1.0.6/src/time.rs.orig	1973-11-29 21:33:09 UTC
++++ cargo-crates/kqueue-1.0.6/src/time.rs
+@@ -1,32 +1,14 @@
+-use libc::timespec;
++use libc::{c_long, time_t, timespec};
+ use std::time::Duration;
+ 
+-#[cfg(not(all(
+-    any(target_os = "freebsd", target_os = "macos"),
+-    any(target_arch = "x86", target_arch = "powerpc")
+-)))]
+-pub(crate) fn duration_to_timespec(d: Duration) -> timespec {
+-    let tv_sec = d.as_secs() as i64;
+-    let tv_nsec = d.subsec_nanos() as i64;
++#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
++type NSec = i64;
++#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
++type NSec = c_long;
+ 
+-    if tv_sec.is_negative() {
+-        panic!("Duration seconds is negative");
+-    }
+-
+-    if tv_nsec.is_negative() {
+-        panic!("Duration nsecs is negative");
+-    }
+-
+-    timespec { tv_sec, tv_nsec }
+-}
+-
+-#[cfg(all(
+-    any(target_os = "freebsd", target_os = "macos"),
+-    any(target_arch = "x86", target_arch = "powerpc")
+-))]
+ pub(crate) fn duration_to_timespec(d: Duration) -> timespec {
+-    let tv_sec = d.as_secs() as i32;
+-    let tv_nsec = d.subsec_nanos() as i32;
++    let tv_sec = d.as_secs() as time_t;
++    let tv_nsec = d.subsec_nanos() as NSec;
+ 
+     if tv_sec.is_negative() {
+         panic!("Duration seconds is negative");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303141904.32EJ4sb3021922>