Fix generator.c to avoid calling do_link() on systems that do not support
authorPaul Green <paulg@samba.org>
Thu, 4 May 2006 19:00:37 +0000 (19:00 +0000)
committerPaul Green <paulg@samba.org>
Thu, 4 May 2006 19:00:37 +0000 (19:00 +0000)
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

index 0bb4e9f..5d1077e 100644 (file)
@@ -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);