chmod.c 231 字节
Newer Older
R
Rich Felker 已提交
1
#include <sys/stat.h>
2
#include <fcntl.h>
R
Rich Felker 已提交
3 4 5 6
#include "syscall.h"

int chmod(const char *path, mode_t mode)
{
7
#ifdef SYS_chmod
8
	return syscall(SYS_chmod, path, mode);
9 10 11
#else
	return syscall(SYS_fchmodat, AT_FDCWD, path, mode);
#endif
R
Rich Felker 已提交
12
}