1 diff -u -r ../openssh-7.2p2/sftp-server.c ./sftp-server.c
2 --- ../openssh-7.2p2/sftp-server.c 2016-03-09 13:04:48.000000000 -0500
3 +++ ./sftp-server.c 2016-06-06 18:13:28.141236751 -0400
5 if (lstat(oldpath, &sb) == -1)
6 status = errno_to_portable(errno);
7 else if (S_ISREG(sb.st_mode)) {
9 /* Race-free rename of regular files */
10 + /* Do not try this for Android which does not support links */
11 if (link(oldpath, newpath) == -1) {
12 if (errno == EOPNOTSUPP || errno == ENOSYS
15 || errno == LINK_OPNOTSUPP_ERRNO
28 status = errno_to_portable(errno);
35 } else if (stat(newpath, &sb) == -1) {
36 if (rename(oldpath, newpath) == -1)
37 status = errno_to_portable(errno);