1570af302Sopenharmony_ci#include <sys/stat.h> 2570af302Sopenharmony_ci#include <fcntl.h> 3570af302Sopenharmony_ci#include "syscall.h" 4570af302Sopenharmony_ci 5570af302Sopenharmony_ciint chmod(const char *path, mode_t mode) 6570af302Sopenharmony_ci{ 7570af302Sopenharmony_ci#ifdef SYS_chmod 8570af302Sopenharmony_ci return syscall(SYS_chmod, path, mode); 9570af302Sopenharmony_ci#else 10570af302Sopenharmony_ci return syscall(SYS_fchmodat, AT_FDCWD, path, mode); 11570af302Sopenharmony_ci#endif 12570af302Sopenharmony_ci} 13