diff options
Diffstat (limited to 'usr/klibc/lchown.c')
-rw-r--r-- | usr/klibc/lchown.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/klibc/lchown.c b/usr/klibc/lchown.c new file mode 100644 index 0000000..9a9e1e1 --- /dev/null +++ b/usr/klibc/lchown.c @@ -0,0 +1,12 @@ +#include <fcntl.h> +#include <unistd.h> +#include <sys/syscall.h> + +#ifndef __NR_lchown + +int lchown(const char *path, uid_t owner, gid_t group) +{ + return fchownat(AT_FDCWD, path, owner, group, AT_SYMLINK_NOFOLLOW); +} + +#endif /* __NR_lchown */ |