aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/c.zig')
-rw-r--r--lib/std/c.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig
index 1688824dd9..bd0ce04f75 100644
--- a/lib/std/c.zig
+++ b/lib/std/c.zig
@@ -37,9 +37,9 @@ pub usingnamespace switch (std.Target.current.os.tag) {
else => struct {},
};
-pub fn getErrno(rc: anytype) u16 {
+pub fn getErrno(rc: anytype) c_int {
if (rc == -1) {
- return @intCast(u16, _errno().*);
+ return _errno().*;
} else {
return 0;
}