From 7ba7645f24c068492e838640b02cc45bf5a27f7f Mon Sep 17 00:00:00 2001 From: Patrik Cyvoct Date: Sun, 23 Jun 2024 15:03:55 +0200 Subject: [PATCH] backend/io_uring: fix build for zig 0.13 As per https://github.com/ziglang/zig/blob/0.13.0/lib/std/os/linux/io_uring_sqe.zig#L318 it should be a `linux.kernel_timespec`. Signed-off-by: Patrik Cyvoct --- src/backend/io_uring.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/io_uring.zig b/src/backend/io_uring.zig index 9c744a3..e9e2d02 100644 --- a/src/backend/io_uring.zig +++ b/src/backend/io_uring.zig @@ -285,11 +285,11 @@ pub const Loop = struct { self.add(c_cancel); } - fn timer_next(self: *Loop, next_ms: u64) linux.timespec { + fn timer_next(self: *Loop, next_ms: u64) linux.kernel_timespec { // Get the timestamp of the absolute time that we'll execute this timer. // There are lots of failure scenarios here in math. If we see any // of them we just use the maximum value. - const max: linux.timespec = .{ + const max: linux.kernel_timespec = .{ .tv_sec = std.math.maxInt(isize), .tv_nsec = std.math.maxInt(isize), }; @@ -955,13 +955,13 @@ pub const Operation = union(OperationType) { }, timer: struct { - next: linux.timespec, + next: linux.kernel_timespec, /// Only used internally. If this is non-null and timer is /// CANCELLED, then the timer is rearmed automatically with this /// as the next time. The callback will not be called on the /// cancellation. - reset: ?linux.timespec = null, + reset: ?linux.kernel_timespec = null, }, timer_remove: struct {