From b59dc8d5ae4cd0170587932550008c60871fafd9 Mon Sep 17 00:00:00 2001 From: Paul Green Date: Thu, 4 May 2006 19:00:37 +0000 Subject: [PATCH] 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. --- generator.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.34.1