X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/73173af955911d89460d9f34d2861dcacb4131f9..6b54a688cfb790542c3a9b7705fe3cb664f9ffc0:/generator.c diff --git a/generator.c b/generator.c index 0bb4e9fe..d8863d7c 100644 --- a/generator.c +++ b/generator.c @@ -740,7 +740,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx, } else { rprintf(FERROR, "internal: try_dests_non() called with invalid mode (%o)\n", - file->mode); + (int)file->mode); exit_cleanup(RERR_UNSUPPORTED); } if (link_dest @@ -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);