blob: 43d0a75f5a733b6e0d2c0167eb0b72b7ce555a6f [file] [log] [blame]
#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
}