summaryrefslogblamecommitdiff
path: root/src/unistd/lchown.c
blob: ccd5ee0255eea2af0dcec6f134e21ce07a896faf (plain) (tree)
1
2
3
4
5
6
7
8
                   
                  



                                                  
                 
                                                   


                                                                                    
 
#include <unistd.h>
#include <fcntl.h>
#include "syscall.h"

int lchown(const char *path, uid_t uid, gid_t 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
}