diff options
| author | CiD- <jkercher43@gmail.com> | 2022-04-01 22:41:35 -0400 |
|---|---|---|
| committer | CiD- <jkercher43@gmail.com> | 2022-04-01 22:41:35 -0400 |
| commit | 88de3a1c0633761e2f73f4e576a0dfd2bb9c32bf (patch) | |
| tree | 4c6b77281d88fa86b17c69e1847d74a7e6224c89 /core/sys | |
| parent | 645661889137f6f4cb96b9671976dbc006345497 (diff) | |
add _chtimes
Diffstat (limited to 'core/sys')
| -rw-r--r-- | core/sys/unix/syscalls_linux.odin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/sys/unix/syscalls_linux.odin b/core/sys/unix/syscalls_linux.odin index 8a1aadb9c..6fc6dc594 100644 --- a/core/sys/unix/syscalls_linux.odin +++ b/core/sys/unix/syscalls_linux.odin @@ -1779,6 +1779,12 @@ sys_fork :: proc() -> int { } } +// NOTE: Unsure about if this works directly on 32 bit archs. It may need 32 bit version of the time struct. +// As of Linux 5.1, there is a utimensat_time64 function. Maybe use this in the future? +sys_utimensat :: proc(dfd: int, path: cstring, times: rawptr, flags: int) -> int { + return int(intrinsics.syscall(SYS_utimensat, uintptr(dfd), uintptr(rawptr(path)), uintptr(times), uintptr(flags))) +} + get_errno :: proc(res: int) -> i32 { if res < 0 && res > -4096 { return i32(-res) |