[E0308] mismatched type in pw_thread_loop_timed_wait_full call
Hi there!
I was trying to compile cosmic-epoch when I encountered the following compilation error in pipewire-rs
:
error[E0308]: mismatched types
--> /home/andrei/.cargo/git/checkouts/pipewire-rs-e803a8db90410a99/ff923ee/pipewire/src/thread_loop.rs:212:17
|
210 | pw_sys::pw_thread_loop_timed_wait_full(
| -------------------------------------- arguments to this function are incorrect
211 | self.as_ptr(),
212 | &abstime as *const pw_sys::timespec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ in mutability
|
= note: expected raw pointer `*mut pipewire_sys::timespec`
found raw pointer `*const pipewire_sys::timespec`
note: function defined here
--> /home/andrei/git/ext/cosmic-epoch/xdg-desktop-portal-cosmic/target/release/build/pipewire-sys-1125ee3fe6f8b44c/out/bindings.rs:7012:12
|
7012 | pub fn pw_thread_loop_timed_wait_full(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
I am a newcomer here, but I noticed that bindings.rs
is generated, so I believe the solution here would be to change L212 from &abstime as *const pw_sys::timespec
to &mut abstime as *mut pw_sys::timespec
, and use let mut abstime
accordingly 6 lines above.
If you agree with the proposed solution, I would be more than happy to create a tiny PR to fix this, once I receive fork access to gitlab.freedesktop.org
. Thank you for your time!
P.S.: I feel like information about my machine (up-to-date Debian 12) is not relevant with this issue.