projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add arm and sh bits/ptrace.h
[musl]
/
src
/
unistd
/
lchown.c
diff --git
a/src/unistd/lchown.c
b/src/unistd/lchown.c
index
a840213
..
ccd5ee0
100644
(file)
--- a/
src/unistd/lchown.c
+++ b/
src/unistd/lchown.c
@@
-1,7
+1,12
@@
#include <unistd.h>
#include <unistd.h>
+#include <fcntl.h>
#include "syscall.h"
int lchown(const char *path, uid_t uid, gid_t gid)
{
#include "syscall.h"
int lchown(const char *path, uid_t uid, gid_t gid)
{
- return syscall3(__NR_lchown, (long)path, uid, gid);
+#ifdef SYS_lchown
+ return syscall(SYS_lchown, path, uid, gid);
+#else
+ return syscall(SYS_fchownat, AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW);
+#endif
}
}