From: Paul Green Date: Thu, 4 May 2006 19:00:37 +0000 (+0000) Subject: Fix generator.c to avoid calling do_link() on systems that do not support X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/b59dc8d5ae4cd0170587932550008c60871fafd9 Fix generator.c to avoid calling do_link() on systems that do not support the link() function. The changes test OK on SuSE Linux and on my own Stratus VOS system, but I would be grateful if other folks could double-check this change. Paul G. --- diff --git a/generator.c b/generator.c index 0bb4e9fe..5d1077e2 100644 --- a/generator.c +++ b/generator.c @@ -751,7 +751,10 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx, && !IS_SPECIAL(file->mode) && !IS_DEVICE(file->mode) #endif ) { - if (do_link(fnamebuf, fname) < 0) { +#ifdef SUPPORT_HARD_LINKS + if (do_link(fnamebuf, fname) < 0) +#endif + { rsyserr(FERROR, errno, "failed to hard-link %s with %s", fnamebuf, fname);