]> git.saurik.com Git - apt.git/commitdiff
unlinkat is way way too modern to not autoconf :/.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 30 Nov 2016 06:03:35 +0000 (22:03 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 30 Nov 2016 06:03:35 +0000 (22:03 -0800)
apt-pkg/deb/dpkgpm.cc

index 2e779ca8ba4d4338de6f2360ae59205afa77b6ac..79c5f9bdf719cbf9483c51484aca7573c7d37f82 100644 (file)
@@ -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);