Debian Codegraph @

debian/patches/nix-0.29.patch

raw
1 Index: calloop-0.10/Cargo.toml
2 ===================================================================
3 --- calloop-0.10.orig/Cargo.toml
4 +++ calloop-0.10/Cargo.toml
5 @@ -56,7 +56,7 @@ default-features = false
6 version = "0.4"
7
8 [dependencies.nix]
9 -version = "0.27"
10 +version = "0.29"
11 features = [
12 "event",
13 "fs",
14 Index: calloop-0.10/src/loop_logic.rs
15 ===================================================================
16 --- calloop-0.10.orig/src/loop_logic.rs
17 +++ calloop-0.10/src/loop_logic.rs
18 @@ -501,6 +501,7 @@ impl LoopSignal {
19 mod tests {
20 use std::time::Duration;
21 use std::os::fd::IntoRawFd;
22 + use std::os::fd::BorrowedFd;
23
24 use crate::{
25 generic::Generic, ping::*, Dispatcher, Interest, Mode, Poll, PostAction, Readiness,
26 @@ -788,7 +789,7 @@ mod tests {
27 assert!(!dispatched);
28
29 // write something, the socket becomes readable
30 - write(sock2, &[1, 2, 3]).unwrap();
31 + write(unsafe { BorrowedFd::borrow_raw(sock2) }, &[1, 2, 3]).unwrap();
32 dispatched = false;
33 event_loop
34 .dispatch(Duration::ZERO, &mut dispatched)
35 Index: calloop-0.10/src/sources/ping/eventfd.rs
36 ===================================================================
37 --- calloop-0.10.orig/src/sources/ping/eventfd.rs
38 +++ calloop-0.10/src/sources/ping/eventfd.rs
39 @@ -20,6 +20,7 @@
40
41 use std::{os::unix::io::RawFd, sync::Arc};
42 use std::os::fd::IntoRawFd;
43 +use std::os::fd::BorrowedFd;
44
45 use nix::sys::eventfd::{eventfd, EfdFlags};
46 use nix::unistd::{read, write};
47 @@ -64,7 +65,7 @@ pub fn make_ping() -> std::io::Result<(P
48 #[inline]
49 fn send_ping(fd: RawFd, count: u64) -> std::io::Result<()> {
50 assert!(count > 0);
51 - match write(fd, &count.to_ne_bytes()) {
52 + match write(unsafe { BorrowedFd::borrow_raw(fd) }, &count.to_ne_bytes()) {
53 // The write succeeded, the ping will wake up the loop.
54 Ok(_) => Ok(()),
55