summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.cc
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-11-29 22:03:35 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2016-11-29 22:03:35 -0800
commit46ea89bf9aa2c814e803795cb29338d524389d4e (patch)
tree70beab1676236583780a538d5ecb4afc8a46318e /apt-pkg/deb/dpkgpm.cc
parentd453c9a7ef236b4906b80648ae916a69ae780399 (diff)
unlinkat is way way too modern to not autoconf :/.
Diffstat (limited to 'apt-pkg/deb/dpkgpm.cc')
-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 2e779ca8b..79c5f9bdf 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1385,7 +1385,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);