File: nix-v0.27-compatibility.patch

package info (click to toggle)
rust-termwiz 0.22.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,036 kB
  • sloc: sh: 10,450; makefile: 18
file content (26 lines) | stat: -rw-r--r-- 724 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
Description: quilt version 0.27+ compatibitlity
 nix has gated functionalities behind features since v0.27+
 It has also changed changes like RawFd -> OwnedFd
Author: Ananthu C V <weepingclown@disroot.org>
Forwarded: not-needed
Last-Update: 2024-12-14
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -194,2 +194,3 @@
 version = "0.29"
+features = ["fs", "mman"]
 
--- a/src/escape/apc.rs
+++ b/src/escape/apc.rs
@@ -275,5 +275,4 @@
     use std::fs::File;
-    use std::os::unix::io::FromRawFd;
 
-    let raw_fd = shm_open(
+    let owned_fd = shm_open(
         name,
@@ -289,3 +288,3 @@
     })?;
-    let mut f = unsafe { File::from_raw_fd(raw_fd) };
+    let mut f = File::from(owned_fd);
     if let Some(offset) = data_offset {