X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstat%2Fchmod.c;h=d4f53c564e14701ea360a7159037c39838266d9f;hb=95a540e176b3ebd57d6033fd23cf9fec8a5ddbe8;hp=cb310fecd63f38e4035aa25c95bdfb0e464bcbf9;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stat/chmod.c b/src/stat/chmod.c index cb310fec..d4f53c56 100644 --- a/src/stat/chmod.c +++ b/src/stat/chmod.c @@ -1,7 +1,12 @@ #include +#include #include "syscall.h" int chmod(const char *path, mode_t mode) { - return syscall2(__NR_chmod, (long)path, mode); +#ifdef SYS_chmod + return syscall(SYS_chmod, path, mode); +#else + return syscall(SYS_fchmodat, AT_FDCWD, path, mode); +#endif }