summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-11-29 22:03:35 -0800
committerSam Bingner <sam@bingner.com>2020-07-17 00:22:23 -1000
commit00b67a48221b00966c56b96c59f38ec0b145aded (patch)
tree01cc52cbc8cea92df97eadb03598421e97153207
parent251bf73394edf5939985889deb7943fb5b23b2fa (diff)
unlinkat is way way too modern to not autoconf :/.
-rw-r--r--apt-pkg/deb/dpkgpm.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index ffa880df2..51c341803 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1403,7 +1403,9 @@ static void cleanUpTmpDir(char * const tmpdir) /*{{{*/
if (unlikely(Ent->d_type != DT_LNK && Ent->d_type != DT_UNKNOWN))
continue;
#endif
- if (unlikely(unlinkat(dfd, Ent->d_name, 0) != 0))
+ char path[strlen(tmpdir) + 1 + strlen(Ent->d_name) + 1];
+ sprintf(path, "%s/%s", tmpdir, Ent->d_name);
+ if (unlikely(unlink(path) != 0))
break;
}
closedir(D);