chmod.c 231 B

123456789101112
  1. #include <sys/stat.h>
  2. #include <fcntl.h>
  3. #include "syscall.h"
  4. int chmod(const char *path, mode_t mode)
  5. {
  6. #ifdef SYS_chmod
  7. return syscall(SYS_chmod, path, mode);
  8. #else
  9. return syscall(SYS_fchmodat, AT_FDCWD, path, mode);
  10. #endif
  11. }