diff --git a/core/c/libc/errno.odin b/core/c/libc/errno.odin index 53437f42f..fe6fbb073 100644 --- a/core/c/libc/errno.odin +++ b/core/c/libc/errno.odin @@ -14,11 +14,24 @@ when ODIN_OS == .Windows { // EDOM, // EILSEQ // ERANGE -when ODIN_OS == .Linux || ODIN_OS == .FreeBSD { +when ODIN_OS == .Linux { @(private="file") @(default_calling_convention="c") foreign libc { - @(link_name="__libc_errno_location") + @(link_name="__errno_location") + _get_errno :: proc() -> ^int --- + } + + EDOM :: 33 + EILSEQ :: 84 + ERANGE :: 34 +} + +when ODIN_OS == .FreeBSD { + @(private="file") + @(default_calling_convention="c") + foreign libc { + @(link_name="__error") _get_errno :: proc() -> ^int --- }