From: Wayne Davison Date: Wed, 30 Jul 2008 01:06:26 +0000 (-0700) Subject: Make hard-linking work when a device has an st_dev of 0. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/c8b823f9d8849a3bcb0ab9ffc85ff02c3d2eb367?hp=45c37e737f2a2f753d06b57605e66782aa93a114 Make hard-linking work when a device has an st_dev of 0. --- diff --git a/flist.c b/flist.c index 2d17bf7f..849851e0 100644 --- a/flist.c +++ b/flist.c @@ -1242,8 +1242,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, if (protocol_version >= 28 ? (!S_ISDIR(st.st_mode) && st.st_nlink > 1) : S_ISREG(st.st_mode)) { - tmp_dev = st.st_dev; - tmp_ino = st.st_ino; + tmp_dev = (int64)st.st_dev + 1; + tmp_ino = (int64)st.st_ino; } else tmp_dev = 0; }