mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 10:50:05 +00:00
commit to merge upstream/master
This commit is contained in:
@@ -1717,7 +1717,7 @@ sys_rmdir :: proc(path: cstring) -> int {
|
||||
}
|
||||
}
|
||||
|
||||
sys_mkdir :: proc(path: cstring, mode: u32 = 0o775) -> int {
|
||||
sys_mkdir :: proc(path: cstring, mode: int) -> int {
|
||||
when ODIN_ARCH != .arm64 {
|
||||
return int(intrinsics.syscall(SYS_mkdir, uintptr(rawptr(path)), uintptr(mode)))
|
||||
} else { // NOTE: arm64 does not have mkdir
|
||||
@@ -1725,6 +1725,14 @@ sys_mkdir :: proc(path: cstring, mode: u32 = 0o775) -> int {
|
||||
}
|
||||
}
|
||||
|
||||
sys_mknod :: proc(path: cstring, mode: int, dev: int) -> int {
|
||||
when ODIN_ARCH != .arm64 {
|
||||
return int(intrinsics.syscall(SYS_mknod, uintptr(rawptr(path)), uintptr(mode), uintptr(dev)))
|
||||
} else { // NOTE: arm64 does not have mknod
|
||||
return int(intrinsics.syscall(SYS_mknodat, uintptr(AT_FDCWD), uintptr(rawptr(path)), uintptr(mode), uintptr(dev)))
|
||||
}
|
||||
}
|
||||
|
||||
sys_truncate :: proc(path: cstring, length: i64) -> int {
|
||||
when ODIN_ARCH == .amd64 || ODIN_ARCH == .arm64 {
|
||||
return int(intrinsics.syscall(SYS_truncate, uintptr(rawptr(path)), uintptr(length)))
|
||||
|
||||
Reference in New Issue
Block a user