X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Funistd%2Fchown.c;h=14b032550d675e6594302a6107c13a599d57443a;hb=40bae2d32fd6f3ffea437fa745ad38a1fe77b27e;hp=b89b17355973d2b7a89cd8f94fad8ff1df0c8d92;hpb=2cdfb7ca26f46f151afbc23d5d94fc68597137f5;p=musl diff --git a/src/unistd/chown.c b/src/unistd/chown.c index b89b1735..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_chown, (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 }