diff --git a/build.zig b/build.zig index 9ab5f74..39a5184 100644 --- a/build.zig +++ b/build.zig @@ -4,7 +4,7 @@ pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - _ = b.addModule("io", .{ .source_file = .{ .path = "src/io.zig" } }); + _ = b.addModule("io", .{ .root_source_file = .{ .path = "src/io.zig" } }); const main_tests = b.addTest(.{ .root_source_file = .{ .path = "src/test.zig" }, diff --git a/src/io/linux.zig b/src/io/linux.zig index eefb08c..dd6d838 100644 --- a/src/io/linux.zig +++ b/src/io/linux.zig @@ -957,7 +957,7 @@ pub const IO = struct { if (@hasDecl(os.O, "LARGEFILE")) flags |= os.O.LARGEFILE; var direct_io_supported = false; - var dir_on_tmpfs = try fs_is_tmpfs(dir_fd); + const dir_on_tmpfs = try fs_is_tmpfs(dir_fd); if (dir_on_tmpfs) { log.warn("tmpfs is not durable, and your data will be lost on reboot", .{}); diff --git a/src/io/windows.zig b/src/io/windows.zig index 206b380..f7f3bc7 100644 --- a/src/io/windows.zig +++ b/src/io/windows.zig @@ -974,7 +974,7 @@ pub const IO = struct { } // O_EXCL - var shared_mode: os.windows.DWORD = 0; + const shared_mode: os.windows.DWORD = 0; // O_RDWR var access_mask: os.windows.DWORD = 0;