File: nix-0.24.patch

package info (click to toggle)
rust-zbus-1 1.9.3-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 864 kB
  • sloc: makefile: 2
file content (52 lines) | stat: -rw-r--r-- 1,674 bytes parent folder | download | duplicates (2)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Index: zbus-1/src/raw/socket.rs
===================================================================
--- zbus-1.orig/src/raw/socket.rs
+++ zbus-1/src/raw/socket.rs
@@ -1,6 +1,7 @@
 use async_io::Async;
 use std::{
     io,
+    io::{IoSlice, IoSliceMut},
     os::unix::{
         io::{AsRawFd, FromRawFd, RawFd},
         net::UnixStream,
@@ -62,12 +63,12 @@ impl Socket for UnixStream {
     const SUPPORTS_FD_PASSING: bool = true;
 
     fn recvmsg(&mut self, buffer: &mut [u8]) -> io::Result<(usize, Vec<OwnedFd>)> {
-        let iov = [IoVec::from_mut_slice(buffer)];
+        let mut iov = [IoSliceMut::new(buffer)];
         let mut cmsgspace = cmsg_space!([RawFd; FDS_MAX]);
 
-        match recvmsg(
+        match recvmsg::<()>(
             self.as_raw_fd(),
-            &iov,
+            &mut iov,
             Some(&mut cmsgspace),
             MsgFlags::empty(),
         ) {
@@ -95,8 +96,8 @@ impl Socket for UnixStream {
         } else {
             vec![]
         };
-        let iov = [IoVec::from_slice(buffer)];
-        match sendmsg(self.as_raw_fd(), &iov, &cmsg, MsgFlags::empty(), None) {
+        let iov = [IoSlice::new(buffer)];
+        match sendmsg::<()>(self.as_raw_fd(), &iov, &cmsg, MsgFlags::empty(), None) {
             // can it really happen?
             Ok(0) => Err(io::Error::new(
                 io::ErrorKind::WriteZero,
Index: zbus-1/Cargo.toml
===================================================================
--- zbus-1.orig/Cargo.toml
+++ zbus-1/Cargo.toml
@@ -53,7 +53,7 @@ version = "0.3.8"
 version = "1.0.2"
 
 [dependencies.nix]
-version = "0.22.3"
+version = "0.24"
 
 [dependencies.once_cell]
 version = "1.4.0"