File: nix-0.29.patch

package info (click to toggle)
rust-rtnetlink 0.14.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 828 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download
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
Index: rtnetlink/Cargo.toml
===================================================================
--- rtnetlink.orig/Cargo.toml
+++ rtnetlink/Cargo.toml
@@ -53,7 +53,7 @@ default-features = false
 version = "0.8"
 
 [dependencies.nix]
-version = "0.27.1"
+version = ">= 0.27.1, < 0.31"
 features = [
     "fs",
     "mount",
Index: rtnetlink/src/ns.rs
===================================================================
--- rtnetlink.orig/src/ns.rs
+++ rtnetlink/src/ns.rs
@@ -11,6 +11,7 @@ use nix::{
     unistd::{fork, ForkResult},
 };
 use std::{option::Option, os::fd::BorrowedFd, path::Path, process::exit};
+use std::os::fd::IntoRawFd;
 
 // if "only" smol or smol+tokio were enabled, we use smol because
 // it doesn't require an active tokio runtime - just to be sure.
@@ -304,7 +305,7 @@ impl NetworkNamespace {
             open_flags,
             Mode::empty(),
         ) {
-            Ok(raw_fd) => raw_fd,
+            Ok(fd) => fd.into_raw_fd(),
             Err(e) => {
                 log::error!("open error: {}", e);
                 let err_msg = format!("open error: {e}");