diff options
author | 2022-02-10 16:43:35 -0800 | |
---|---|---|
committer | 2022-02-10 16:43:35 -0800 | |
commit | e7626b6e04280a656e9e3f4662866749112742d1 (patch) | |
tree | 39a0dc85649a3ae59866a50f1438b0b86b3b9570 | |
parent | 29a718e25dcddcf0f0d5b0b73246697286d1be90 (diff) | |
download | bun-e7626b6e04280a656e9e3f4662866749112742d1.tar.gz bun-e7626b6e04280a656e9e3f4662866749112742d1.tar.zst bun-e7626b6e04280a656e9e3f4662866749112742d1.zip |
Update linux_c.zig
-rw-r--r-- | src/linux_c.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/linux_c.zig b/src/linux_c.zig index d220a0f8c..6247df61d 100644 --- a/src/linux_c.zig +++ b/src/linux_c.zig @@ -276,3 +276,7 @@ pub const SystemErrno = enum(u8) { break :brk map; }; }; + +pub fn preallocate_file(fd: std.os.fd_t, offset: std.os.off_t, len: std.os.off_t) anyerror!void { + _ = std.os.linux.fallocate(fd, 0, @intCast(i64, offset), len); +} |