Skip to content

Commit

Permalink
Moved kluged (conditional) define of lchown from rsync.h to syscall.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Jan 3, 2005
1 parent 80a25bb commit 0515476
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions rsync.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,6 @@ extern int errno;
#define SUPPORT_LINKS HAVE_READLINK
#define SUPPORT_HARD_LINKS HAVE_LINK

/* This could be bad on systems which have no lchown and where chown
* follows symbollic links. On such systems it might be better not to
* try to chown symlinks at all. */
#ifndef HAVE_LCHOWN
#define lchown chown
#endif

#define SIGNAL_CAST (RETSIGTYPE (*)())

#ifndef EWOULDBLOCK
Expand Down
3 changes: 3 additions & 0 deletions syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ int do_lchown(const char *path, uid_t owner, gid_t group)
{
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
#ifdef HAVE_LCHOWN
#define lchown chown
#endif
return lchown(path, owner, group);
}

Expand Down

0 comments on commit 0515476

Please sign in to comment.