commit 42a3b60c331cf01d1ab80eb79e959bc86397f75b (tree)
parent 697e22caa49716369dff6c86461b94fe10b0a009
Author: mllken <emilliken@gmail.com>
Date: Thu, 6 Oct 2022 14:21:59 +0700
io_uring: allow for nullable arguments
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/std/os/linux/io_uring.zig b/lib/std/os/linux/io_uring.zig
@@ -474,8 +474,8 @@ pub const IO_Uring = struct {
self: *IO_Uring,
user_data: u64,
fd: os.fd_t,
- addr: *os.sockaddr,
- addrlen: *os.socklen_t,
+ addr: ?*os.sockaddr,
+ addrlen: ?*os.socklen_t,
flags: u32,
) !*linux.io_uring_sqe {
const sqe = try self.get_sqe();
@@ -1292,8 +1292,8 @@ pub inline fn __io_uring_prep_poll_mask(poll_mask: u32) u32 {
pub fn io_uring_prep_accept(
sqe: *linux.io_uring_sqe,
fd: os.fd_t,
- addr: *os.sockaddr,
- addrlen: *os.socklen_t,
+ addr: ?*os.sockaddr,
+ addrlen: ?*os.socklen_t,
flags: u32,
) void {
// `addr` holds a pointer to `sockaddr`, and `addr2` holds a pointer to socklen_t`.