+ if (link(fnamevb.buf,fnametmpvb.buf))
+- ohshite(_("unable to make backup link of `%.255s' before installing new version"),
+- ti->name);
++ /* Termux modification: Try with rename(2) for systems not supporting hardlinks. */
++ if (rename(fnamevb.buf,fnametmpvb.buf))
++ ohshite(_("unable to make backup link of `%.255s' before installing new version"),
++ ti->name);
+ }
+ }
+