File: use-mem-zeroed.patch

package info (click to toggle)
rust-io-uring 0.7.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,132 kB
  • sloc: makefile: 2
file content (22 lines) | stat: -rw-r--r-- 765 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
use mem::zeroed to create instances of io_uring_getevents_arg to
support both the pregenerated bindings and the bindgen generated
bindings.

Index: io-uring/src/types.rs
===================================================================
--- io-uring.orig/src/types.rs
+++ io-uring/src/types.rs
@@ -233,12 +233,7 @@ pub struct SubmitArgs<'prev: 'now, 'now>
 impl<'prev, 'now> SubmitArgs<'prev, 'now> {
     #[inline]
     pub const fn new() -> SubmitArgs<'static, 'static> {
-        let args = sys::io_uring_getevents_arg {
-            sigmask: 0,
-            sigmask_sz: 0,
-            min_wait_usec: 0,
-            ts: 0,
-        };
+        let args: sys::io_uring_getevents_arg = unsafe { core::mem::zeroed() };
 
         SubmitArgs {
             args,