-Date: Fri, 12 Apr 2002 13:44:22 +0200
-From: Marco d'Itri <md@Linux.IT>
-To: mbp@samba.org
-Subject: rsync and debian mirrors
+Marco d'Itri wrote:
I run one of the debian mirrors, and I had to write this patch because
my archive is split between more than one disk. Would you accept a more
polished version of this patch for inclusion in rsync?
-[Updated to latest CVS source by Wayne Davison.]
+To use this patch, run these commands for a successful build:
---- syscall.c 18 Feb 2004 22:33:21 -0000 1.30
-+++ syscall.c 23 Feb 2004 20:28:56 -0000
-@@ -58,9 +58,14 @@
- #if HAVE_LINK
- int do_link(char *fname1, char *fname2)
+ patch -p1 <patches/soften-links.diff
+ ./configure (optional if already run)
+ make
+
+based-on: 6c8ca91c731b7bf2b081694bda85b7dadc2b7aff
+diff --git a/syscall.c b/syscall.c
+--- a/syscall.c
++++ b/syscall.c
+@@ -136,13 +136,18 @@ ssize_t do_readlink(const char *path, char *buf, size_t bufsiz)
+ #if defined HAVE_LINK || defined HAVE_LINKAT
+ int do_link(const char *old_path, const char *new_path)
{
+ int st;
+
if (dry_run) return 0;
RETURN_ERROR_IF_RO_OR_LO;
-- return link(fname1, fname2);
-+ st = link(fname1, fname2);
+ #ifdef HAVE_LINKAT
+- return linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0);
++ st = linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0);
+ #else
+- return link(old_path, new_path);
++ st = link(old_path, new_path);
+ #endif
+ if (/*soften_links &&*/ st != 0 && errno == EXDEV)
-+ st = symlink(fname1, fname2);
++ st = symlink(old_path, new_path);
+ return st;
}
#endif
---
-ciao,
-Marco
-