summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2014-06-22 09:04:24 -0700
committerWayne Davison <wayned@samba.org>2014-06-22 09:04:24 -0700
commit0466e46b9fc3d32f383dcddc534059bd7eec7395 (patch)
tree0a889b4b7cde8b309ad5ff0ed40af9fa027ab5a6
parentaa4c6db04379322551e3b3ae5f84108f7564864f (diff)
downloadrsync-0466e46b9fc3d32f383dcddc534059bd7eec7395.tar.gz
rsync-0466e46b9fc3d32f383dcddc534059bd7eec7395.tar.bz2
rsync-0466e46b9fc3d32f383dcddc534059bd7eec7395.zip
Make sure the link() destination file doesn't exist.
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 588f551a..1729be97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -705,6 +705,7 @@ AC_CACHE_CHECK([whether link() can hard-link symlinks],rsync_cv_can_hardlink_sym
main() {
unlink(FILENAME);
if (symlink("conftest.no-such", FILENAME) < 0) abort();
+ unlink(FILENAME "2");
if (link(FILENAME, FILENAME "2") < 0) exit(1);
exit(0);
}],
@@ -724,6 +725,7 @@ AC_CACHE_CHECK([whether link() can hard-link special files],rsync_cv_can_hardlin
main() {
unlink(FILENAME);
if (mkfifo(FILENAME, 0777) < 0) abort();
+ unlink(FILENAME "2");
if (link(FILENAME, FILENAME "2") < 0) exit(1);
exit(0);
}],