aboutsummaryrefslogtreecommitdiff
path: root/multimedia/helvum/files/patch-pipewire_32bit
blob: c163976525bc69114e46f8576f9718daa18bf647 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/merge_requests/108

error[E0277]: the trait bound `i32: From<u32>` is not satisfied
   --> cargo-crates/pipewire-0.4.1/src/loop_.rs:414:50
    |
414 |                 tv_nsec: duration.subsec_nanos().into(),
    |                                                  ^^^^ the trait `From<u32>` is not implemented for `i32`
    |
    = help: the following implementations were found:
              <i32 as From<NonZeroI32>>
              <i32 as From<bool>>
              <i32 as From<i16>>
              <i32 as From<i8>>
            and 3 others
    = note: required because of the requirements on the impl of `Into<i32>` for `u32`

--- cargo-crates/pipewire-0.4.1/src/loop_.rs.orig	1973-11-29 21:33:09 UTC
+++ cargo-crates/pipewire-0.4.1/src/loop_.rs
@@ -411,7 +411,7 @@ where
         fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
             spa_sys::timespec {
                 tv_sec: duration.as_secs().try_into().expect("Duration too long"),
-                tv_nsec: duration.subsec_nanos().into(),
+                tv_nsec: duration.subsec_nanos() as libc::c_long,
             }
         }