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

int chmod(const char *path, mode_t mode)
{
#ifdef SYS_chmod
	return syscall(SYS_chmod, path, mode);
#else
	return syscall(SYS_fchmodat, AT_FDCWD, path, mode);
#endif
}


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