user: implement mlibc as the libc, finally.
It's finally done.. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#include <astral/syscall.h>
|
||||
#include <astral/archctl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef MLIBC_BUILDING_RTLD
|
||||
|
||||
int arch_ctl(int func, void *arg) {
|
||||
long ret;
|
||||
long error = syscall(SYSCALL_ARCHCTL, &ret, func, (uint64_t)arg);
|
||||
if(error)
|
||||
errno = error;
|
||||
return error ? -1 : ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user