compiling on linux - bunch of fixes #2

Merged
mdt merged 3 commits from compiling-on-linux into main 2026-02-10 14:44:44 +00:00
Showing only changes of commit 16c17054e8 - Show all commits

View File

@@ -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;