Chromium Code Reviews| Index: fusl/src/stat/chmod.c |
| diff --git a/fusl/src/stat/chmod.c b/fusl/src/stat/chmod.c |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d4f53c564e14701ea360a7159037c39838266d9f |
| --- /dev/null |
| +++ b/fusl/src/stat/chmod.c |
| @@ -0,0 +1,12 @@ |
| +#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 |
| +} |