- (dtucker) [sftp-server.c] Bug #1447: fall back to racy rename if link
   returns EXDEV.  Patch from Mike Garrison, ok djm@
diff --git a/sftp-server.c b/sftp-server.c
index a4c4f16..24c4ff7 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1042,6 +1042,9 @@
 		/* Race-free rename of regular files */
 		if (link(oldpath, newpath) == -1) {
 			if (errno == EOPNOTSUPP
+#ifdef EXDEV
+			    || errno == EXDEV
+#endif
 #ifdef LINK_OPNOTSUPP_ERRNO
 			    || errno == LINK_OPNOTSUPP_ERRNO
 #endif