From 16c17054e868d3f4a97feb4565ed618e2e5ebbd4 Mon Sep 17 00:00:00 2001 From: Paul Peregud Date: Mon, 9 Feb 2026 15:04:47 +0100 Subject: [PATCH] fix call to fallocate on linux --- src/files/file.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/files/file.zig b/src/files/file.zig index 1d04123..c4bef3d 100644 --- a/src/files/file.zig +++ b/src/files/file.zig @@ -1105,12 +1105,12 @@ pub const FileWriter = struct { // FALLOC_FL_KEEP_SIZE = 0x01 - allocate without changing file size const FALLOC_FL_KEEP_SIZE = 0x01; const fd = file.handle; - const result = std.os.linux.syscall(.fallocate, .{ + const result = std.os.linux.syscall4(.fallocate, @as(usize, @intCast(fd)), @as(usize, FALLOC_FL_KEEP_SIZE), @as(usize, 0), // offset @as(usize, @intCast(size)), - }); + ); if (result == 0) { std.log.debug("PERF: Pre-allocated {} MB with fallocate", .{size / (1024 * 1024)}); return;