From 8c053af73e0d98cb25f117acc836a7e23da708ea Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 17 May 2021 18:38:18 -0400 Subject: [PATCH] linux::io_uring: rewrite non-complaint code The sqe type contains several unions which do not have default values. Signed-off-by: Drew DeVault --- io_uring/sqe.ha | 4 ++-- diff --git a/io_uring/sqe.ha b/io_uring/sqe.ha index 70e3dfaa4f899a234b74d2ac992ba2542b400e30..97a14a7bec53c3ad87f58184725b3fabae7609ca 100644 --- a/io_uring/sqe.ha +++ b/io_uring/sqe.ha @@ -2,8 +2,8 @@ use rt; use types; fn prep(sq: *sqe, op: op, flags: sqe_flags...) void = { - // XXX: Is this compatible with the spec? - *sq = sqe { opcode = op, ... }; + rt::memset(sq, 0, size(sqe)); + sq.opcode = op; for (let i = 0z; i < len(flags); i += 1) { sq.flags |= flags[i]; }; -- 2.48.1