Commit | Line | Data |
---|---|---|
ee1dcc97 FF |
1 | diff -u -r ../dpkg-1.18.4/src/configure.c ./src/configure.c |
2 | --- ../dpkg-1.18.4/src/configure.c 2015-11-26 18:53:41.000000000 -0500 | |
3 | +++ ./src/configure.c 2016-03-03 17:41:42.494272593 -0500 | |
4 | @@ -496,8 +496,10 @@ | |
5 | pkg_name(pkg, pnaw_nonambig), cdr2.buf, | |
6 | strerror(errno)); | |
7 | if (!(what & CFOF_USER_DEL)) | |
8 | - if (link(cdr.buf, cdr2.buf)) | |
9 | - warning(_("%s: failed to link '%.250s' to '%.250s': %s"), | |
10 | + /** Termux modification: Use rename(2) instead of link(2), to avoid hard | |
11 | + links which does not work on Android 6.0 or later. */ | |
12 | + if (rename(cdr.buf, cdr2.buf)) | |
13 | + warning(_("%s: failed to rename '%.250s' to '%.250s': %s"), | |
14 | pkg_name(pkg, pnaw_nonambig), cdr.buf, | |
15 | cdr2.buf, strerror(errno)); | |
16 | /* Fall through. */ |