From 636d3ba780aa305ca79066e7e746dd5c64f1efd1 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sat, 30 May 2020 16:05:46 +0200 Subject: [PATCH] linux: fix IOSQE_BIT decl and io_uring_sqe flags --- lib/std/os/bits/linux.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig index e58b1ca4b3..dbdae19959 100644 --- a/lib/std/os/bits/linux.zig +++ b/lib/std/os/bits/linux.zig @@ -1270,7 +1270,7 @@ pub const io_uring_sqe = extern struct { union3: union3, }; -pub const IOSQE_BIT = extern enum { +pub const IOSQE_BIT = extern enum(u8) { FIXED_FILE, IO_DRAIN, IO_LINK, @@ -1283,16 +1283,16 @@ pub const IOSQE_BIT = extern enum { // io_uring_sqe.flags /// use fixed fileset -pub const IOSQE_FIXED_FILE = 1 << IOSQE_BIT.FIXED_FILE; +pub const IOSQE_FIXED_FILE = 1 << @enumToInt(IOSQE_BIT.FIXED_FILE); /// issue after inflight IO -pub const IOSQE_IO_DRAIN = 1 << IOSQE_BIT.IO_DRAIN; +pub const IOSQE_IO_DRAIN = 1 << @enumToInt(IOSQE_BIT.IO_DRAIN); /// links next sqe -pub const IOSQE_IO_LINK = 1 << IOSQE_BIT.IO_LINK; +pub const IOSQE_IO_LINK = 1 << @enumToInt(IOSQE_BIT.IO_LINK); /// like LINK, but stronger -pub const IOSQE_IO_HARDLINK = 1 << IOSQE_BIT.IO_HARDLINK; +pub const IOSQE_IO_HARDLINK = 1 << @enumToInt(IOSQE_BIT.IO_HARDLINK); /// always go async pub const IOSQE_ASYNC = 1 << IOSQE_BIT.ASYNC;