X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Funistd%2Fchown.c;h=14b032550d675e6594302a6107c13a599d57443a;hb=f76e183111bc4491ee575c3e2fcc793412acff4e;hp=6069a2fee0249462480d37d1cfeeccab18d33331;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/unistd/chown.c b/src/unistd/chown.c index 6069a2fe..14b03255 100644 --- a/src/unistd/chown.c +++ b/src/unistd/chown.c @@ -1,7 +1,12 @@ #include +#include #include "syscall.h" int chown(const char *path, uid_t uid, gid_t gid) { - return syscall3(__NR_chown32, (long)path, uid, gid); +#ifdef SYS_chown + return syscall(SYS_chown, path, uid, gid); +#else + return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, 0); +#endif }