File: nix-0.29.patch

package info (click to toggle)
wlgreet 0.5.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,816 kB
  • sloc: makefile: 15
file content (41 lines) | stat: -rw-r--r-- 1,307 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
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@
 smithay-client-toolkit = ">=0.16"
 rusttype = ">=0.9"
 chrono = ">=0.4"
-nix = ">=0.27"
+nix = ">=0.29"
 memmap2 = ">=0.3"
 os_pipe = { version = ">=1.1", features = ["io_safety"] }
 wayland-client = { version = "0.29" }
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,6 +4,7 @@
 use std::sync::mpsc::channel;
 
 use nix::poll::{poll, PollFd, PollFlags};
+use nix::poll::PollTimeout;
 use os_pipe::pipe;
 
 mod app;
@@ -41,8 +42,8 @@
     let connection_fd = unsafe { BorrowedFd::borrow_raw(app.display().get_connection_fd()) };
     let rx_pipe_fd = unsafe { BorrowedFd::borrow_raw(rx_pipe.as_raw_fd()) };
     let mut fds = [
-        PollFd::new(&connection_fd, PollFlags::POLLIN),
-        PollFd::new(&rx_pipe_fd, PollFlags::POLLIN),
+        PollFd::new(connection_fd, PollFlags::POLLIN),
+        PollFd::new(rx_pipe_fd, PollFlags::POLLIN),
     ];
 
     app.cmd_queue().lock().unwrap().push_back(Cmd::Draw);
@@ -85,7 +86,7 @@
             None => {
                 app.flush_display();
 
-                poll(&mut fds, -1).unwrap();
+                poll(&mut fds, PollTimeout::NONE).unwrap();
 
                 if fds[0].revents().unwrap().contains(PollFlags::POLLIN) {
                     if let Some(guard) = app.event_queue().prepare_read() {