File: nix-0.27.patch

package info (click to toggle)
rust-wayland-cursor-0.29 0.29.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: makefile: 4
file content (45 lines) | stat: -rw-r--r-- 1,820 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
35
36
37
38
39
40
41
42
43
44
45
Index: wayland-cursor-0.29/Cargo.toml
===================================================================
--- wayland-cursor-0.29.orig/Cargo.toml
+++ wayland-cursor-0.29/Cargo.toml
@@ -29,7 +29,7 @@ license = "MIT"
 repository = "https://github.com/smithay/wayland-rs"
 
 [dependencies.nix]
-version = "0.24.1"
+version = ">= 0.27, < 1.0"
 features = [
     "fs",
     "mman",
Index: wayland-cursor-0.29/src/lib.rs
===================================================================
--- wayland-cursor-0.29.orig/src/lib.rs
+++ wayland-cursor-0.29/src/lib.rs
@@ -47,6 +47,7 @@ use std::io::{Error as IoError, Read, Re
 use std::ops::{Deref, Index};
 use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
 use std::time::{SystemTime, UNIX_EPOCH};
+use std::os::fd::IntoRawFd;
 
 use nix::errno::Errno;
 use nix::fcntl;
@@ -333,7 +334,7 @@ fn create_shm_fd() -> IoResult<RawFd> {
             CStr::from_bytes_with_nul(b"wayland-cursor-rs\0").unwrap(),
             memfd::MemFdCreateFlag::MFD_CLOEXEC,
         ) {
-            Ok(fd) => return Ok(fd),
+            Ok(fd) => return Ok(fd.into_raw_fd()),
             Err(Errno::EINTR) => continue,
             Err(Errno::ENOSYS) => break,
             Err(errno) => return Err(errno.into()),
@@ -356,8 +357,8 @@ fn create_shm_fd() -> IoResult<RawFd> {
             stat::Mode::S_IRUSR | stat::Mode::S_IWUSR,
         ) {
             Ok(fd) => match mman::shm_unlink(mem_file_handle.as_str()) {
-                Ok(_) => return Ok(fd),
-                Err(errno) => match unistd::close(fd) {
+                Ok(_) => return Ok(fd.into_raw_fd()),
+                Err(errno) => match unistd::close(fd.into_raw_fd()) {
                     Ok(_) => return Err(IoError::from(errno)),
                     Err(errno) => return Err(IoError::from(errno)),
                 },