summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-11-29 22:03:35 -0800
committerSam Bingner <sam@bingner.com>2019-08-17 12:29:11 -1000
commit7dce4f9a0f7f4cf131dcc585d20663ec57910e61 (patch)
tree664228dadc39571383184fa962ca789d7818e653
parentc517f2405abe25ab994ad153af41635e7e6749d3 (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);