File: nix-0.29.patch

package info (click to toggle)
greetd 0.10.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 492 kB
  • sloc: sh: 68; makefile: 50
file content (33 lines) | stat: -rw-r--r-- 1,458 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
Last-Update: 2024-11-08
Forwarded: not-needed
Author: Peter Michael Green <plugwash@debian.org>
Description: minor code change to build with nix 0.29
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: greetd-0.10.3/greetd/Cargo.toml
===================================================================
--- greetd-0.10.3.orig/greetd/Cargo.toml
+++ greetd-0.10.3/greetd/Cargo.toml
@@ -11,7 +11,7 @@ repository = "https://git.sr.ht/~kennyle
 debug = []
 
 [dependencies]
-nix = { version = ">=0.27", features = ["ioctl", "signal", "user", "fs", "mman"] }
+nix = { version = ">=0.29", features = ["ioctl", "signal", "user", "fs", "mman"] }
 pam-sys = "0.5.6"
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
Index: greetd-0.10.3/greetd/src/terminal/mod.rs
===================================================================
--- greetd-0.10.3.orig/greetd/src/terminal/mod.rs
+++ greetd-0.10.3/greetd/src/terminal/mod.rs
@@ -218,7 +218,8 @@ impl Terminal {
     /// Clear this terminal by sending the appropciate escape codes to it. Only
     /// affects text mode.
     pub fn term_clear(&self) -> Result<(), Error> {
-        let res = write(self.fd, b"\x1B[H\x1B[2J");
+        use std::os::fd::BorrowedFd;
+        let res = write(unsafe { BorrowedFd::borrow_raw(self.fd) }, b"\x1B[H\x1B[2J");
         if let Err(v) = res {
             Err(format!("terminal: unable to clear: {}", v).into())
         } else {