diff options
author | Wayne Davison <wayned@samba.org> | 2014-06-22 09:04:24 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2014-06-22 09:04:24 -0700 |
commit | 0466e46b9fc3d32f383dcddc534059bd7eec7395 (patch) | |
tree | 0a889b4b7cde8b309ad5ff0ed40af9fa027ab5a6 | |
parent | aa4c6db04379322551e3b3ae5f84108f7564864f (diff) | |
download | rsync-0466e46b9fc3d32f383dcddc534059bd7eec7395.tar.gz rsync-0466e46b9fc3d32f383dcddc534059bd7eec7395.tar.bz2 rsync-0466e46b9fc3d32f383dcddc534059bd7eec7395.zip |
Make sure the link() destination file doesn't exist.
-rw-r--r-- | configure.ac | 2 |
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); }], |