toaruos/libc/unistd/setuid.c

11 lines
202 B
C
Raw Normal View History

2018-05-10 16:23:46 +03:00
#include <syscall.h>
#include <syscall_nums.h>
2018-05-10 16:23:46 +03:00
#include <sys/types.h>
2021-08-31 13:47:04 +03:00
#include <errno.h>
2018-05-10 16:23:46 +03:00
DEFN_SYSCALL1(setuid, SYS_SETUID, unsigned int);
2018-05-10 16:23:46 +03:00
int setuid(uid_t uid) {
2021-08-31 13:47:04 +03:00
__sets_errno(syscall_setuid(uid));
2018-05-10 16:23:46 +03:00
}