diff options
Diffstat (limited to 'usr/klibc/chmod.c')
-rw-r--r-- | usr/klibc/chmod.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/klibc/chmod.c b/usr/klibc/chmod.c new file mode 100644 index 0000000..b5129e6 --- /dev/null +++ b/usr/klibc/chmod.c @@ -0,0 +1,13 @@ +#include <fcntl.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/syscall.h> + +#ifndef __NR_chmod + +int chmod(const char *path, mode_t mode) +{ + return fchmodat(AT_FDCWD, path, mode, 0); +} + +#endif /* __NR_chmod */ |