diff --git a/lib/std/os.zig b/lib/std/os.zig index 3b8767bdc1..86130ed32c 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -292,6 +292,7 @@ pub const ReadError = error{ OperationAborted, BrokenPipe, ConnectionResetByPeer, + ConnectionTimedOut, /// This error occurs when no global event loop is configured, /// and reading from the file descriptor would block. @@ -351,6 +352,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize { ENOBUFS => return error.SystemResources, ENOMEM => return error.SystemResources, ECONNRESET => return error.ConnectionResetByPeer, + ETIMEDOUT => return error.ConnectionTimedOut, else => |err| return unexpectedErrno(err), } } diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig index 7b05e3bcfb..92f01c4195 100644 --- a/lib/std/zig/system.zig +++ b/lib/std/zig/system.zig @@ -837,6 +837,7 @@ pub const NativeTargetInfo = struct { error.BrokenPipe => return error.UnableToReadElfFile, error.Unseekable => return error.UnableToReadElfFile, error.ConnectionResetByPeer => return error.UnableToReadElfFile, + error.ConnectionTimedOut => return error.UnableToReadElfFile, error.Unexpected => return error.Unexpected, error.InputOutput => return error.FileSystem, }; diff --git a/src-self-hosted/stage2.zig b/src-self-hosted/stage2.zig index 38ab49ccc4..d93d069915 100644 --- a/src-self-hosted/stage2.zig +++ b/src-self-hosted/stage2.zig @@ -841,6 +841,7 @@ export fn stage2_libc_parse(stage1_libc: *Stage2LibCInstallation, libc_file_z: [ error.EndOfStream => return .EndOfFile, error.IsDir => return .IsDir, error.ConnectionResetByPeer => unreachable, + error.ConnectionTimedOut => unreachable, error.OutOfMemory => return .OutOfMemory, error.Unseekable => unreachable, error.SharingViolation => return .SharingViolation,