From 68bd82d0cc9b0cd07cde509c1c89a438b6d297c9 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 23 Feb 2025 01:04:25 +0000 Subject: [PATCH] std.posix: Handle USER_MAPPED_FILE in windows ftruncate() impl --- lib/std/posix.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/posix.zig b/lib/std/posix.zig index 30cbcab6e9..3c7893e267 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -1056,6 +1056,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void { .SUCCESS => return, .INVALID_HANDLE => unreachable, // Handle not open for writing .ACCESS_DENIED => return error.AccessDenied, + .USER_MAPPED_FILE => return error.AccessDenied, else => return windows.unexpectedStatus(rc), } }