aboutsummaryrefslogtreecommitdiff
path: root/src/unistd/chown.c
blob: 00bf27d177dc336851af2a92febda0034dd47ce9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <unistd.h>
#include <fcntl.h>
#include "syscall.h"

int chown(const char *path, uid_t uid, gid_t gid)
{
#ifdef SYS_chown
	return syscall(SYS_chown, path, uid, gid);
#else
	return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, 0);
#endif
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif