diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2024-05-27 02:06:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 02:06:50 +0100 |
| commit | 6d163cee8aad0c804db033eb89f6375eb7261a49 (patch) | |
| tree | d75fe03a80d319b5b66bd820d7e06bba452fb8fc | |
| parent | 8421950546c9f4c929cf5cba3081c7c63a143be8 (diff) | |
| parent | cfd4fc835bd3d670cfdd0d31e4fdfecae8c1af9d (diff) | |
Merge pull request #3638 from harold-b/fix-darwin-libc-proc-sigs
Fix a few darwin libc signatures with incorrect parameters.
| -rw-r--r-- | core/os/os_darwin.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin index def0caa13..a688e1ac3 100644 --- a/core/os/os_darwin.odin +++ b/core/os/os_darwin.odin @@ -448,14 +448,14 @@ foreign libc { @(link_name="write") _unix_write :: proc(handle: Handle, buffer: rawptr, count: c.size_t) -> int --- @(link_name="pread") _unix_pread :: proc(handle: Handle, buffer: rawptr, count: c.size_t, offset: i64) -> int --- @(link_name="pwrite") _unix_pwrite :: proc(handle: Handle, buffer: rawptr, count: c.size_t, offset: i64) -> int --- - @(link_name="lseek") _unix_lseek :: proc(fs: Handle, offset: int, whence: int) -> int --- + @(link_name="lseek") _unix_lseek :: proc(fs: Handle, offset: int, whence: c.int) -> int --- @(link_name="gettid") _unix_gettid :: proc() -> u64 --- @(link_name="getpagesize") _unix_getpagesize :: proc() -> i32 --- @(link_name="stat64") _unix_stat :: proc(path: cstring, stat: ^OS_Stat) -> c.int --- @(link_name="lstat64") _unix_lstat :: proc(path: cstring, stat: ^OS_Stat) -> c.int --- @(link_name="fstat64") _unix_fstat :: proc(fd: Handle, stat: ^OS_Stat) -> c.int --- @(link_name="readlink") _unix_readlink :: proc(path: cstring, buf: ^byte, bufsiz: c.size_t) -> c.ssize_t --- - @(link_name="access") _unix_access :: proc(path: cstring, mask: int) -> int --- + @(link_name="access") _unix_access :: proc(path: cstring, mask: c.int) -> c.int --- @(link_name="fsync") _unix_fsync :: proc(handle: Handle) -> c.int --- @(link_name="fdopendir$INODE64") _unix_fdopendir_amd64 :: proc(fd: Handle) -> Dir --- @@ -639,7 +639,7 @@ write_at :: proc(fd: Handle, data: []byte, offset: i64) -> (int, Errno) { seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Errno) { assert(fd != -1) - final_offset := i64(_unix_lseek(fd, int(offset), whence)) + final_offset := i64(_unix_lseek(fd, int(offset), c.int(whence))) if final_offset == -1 { return 0, 1 } @@ -892,7 +892,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) { access :: proc(path: string, mask: int) -> bool { runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD() cstr := strings.clone_to_cstring(path, context.temp_allocator) - return _unix_access(cstr, mask) == 0 + return _unix_access(cstr, c.int(mask)) == 0 } flush :: proc(fd: Handle) -> Errno { |