Add needed functions for acid to link.

This commit is contained in:
4lDO2
2023-03-05 18:28:56 +01:00
parent 2593101ea7
commit 6a658bc33d
13 changed files with 268 additions and 175 deletions
+2 -2
View File
@@ -219,8 +219,8 @@ impl Pal for Sys {
e(unsafe { syscall!(FTRUNCATE, fildes, length) }) as c_int
}
fn futex(addr: *mut c_int, op: c_int, val: c_int, val2: usize) -> c_int {
unsafe { syscall!(FUTEX, addr, op, val, val2, 0, 0) as c_int }
fn futex(addr: *mut c_int, op: c_int, val: c_int, val2: usize) -> Result<c_long, crate::pthread::Errno> {
e_raw(unsafe { syscall!(FUTEX, addr, op, val, val2, 0, 0)}).map(|r| r as c_long).map_err(|e| Errno(e as c_int))
}
fn futimens(fd: c_int, times: *const timespec) -> c_int {