File: fix-32-bit.patch

package info (click to toggle)
rust-udevrs 0.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,292 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/monitor.rs b/src/monitor.rs
index dfd0162..451cf08 100644
--- a/src/monitor.rs
+++ b/src/monitor.rs
@@ -885,7 +885,10 @@ impl UdevMonitor {
                     events: libc::POLLIN,
                     revents: 0,
                 }];
+                #[cfg(target_pointer_width = "64")]
                 let pfd_len = pfd.len() as u64;
+                #[cfg(target_pointer_width = "32")]
+                let pfd_len = pfd.len() as u32;
 
                 // SAFETY: call to `poll` is safe because `pollfd` is properly initialized, and the
                 // resulting mutable pointer references valid memory.