From 89e522b935a8cca96b2e6d0cce0515a1eb8e6451 Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Tue, 2 Mar 2021 08:09:51 +0000 Subject: make std.c.getErrno() return same type as _errno() aka c_int adjust std.os.unexpectedErrno() to be correct for all std.os.system.errno (c_int, u12, usize, ...) --- lib/std/Thread.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/std/Thread.zig') diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index b9a69d151f..7e8a6226e6 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -362,7 +362,7 @@ pub fn spawn(comptime startFn: anytype, context: SpawnContextType(@TypeOf(startF os.EAGAIN => return error.SystemResources, os.EPERM => unreachable, os.EINVAL => unreachable, - else => return os.unexpectedErrno(@intCast(usize, err)), + else => return os.unexpectedErrno(err), } return thread_obj; -- cgit v1.2.3