From e350c37e6f9fdbc3b6392dceb9d368facd8dba0f Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sat, 27 May 2023 21:49:39 +0200 Subject: [PATCH] fix weird errno returned on darwin --- core/os/os_darwin.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin index ef85909c0..8999e867b 100644 --- a/core/os/os_darwin.odin +++ b/core/os/os_darwin.odin @@ -413,7 +413,7 @@ F_OK :: 0 // Test for file existance F_GETPATH :: 50 // return the full path of the fd foreign libc { - @(link_name="__error") __error :: proc() -> ^int --- + @(link_name="__error") __error :: proc() -> ^c.int --- @(link_name="open") _unix_open :: proc(path: cstring, flags: i32, mode: u16) -> Handle --- @(link_name="close") _unix_close :: proc(handle: Handle) -> c.int --- @@ -489,7 +489,7 @@ foreign dl { } get_last_error :: proc "contextless" () -> int { - return __error()^ + return int(__error()^) } get_last_error_string :: proc() -> string {