Просмотр исходного кода

unlinkat is way way too modern to not autoconf :/.

Jay Freeman (saurik) лет назад: 9
Родитель
Сommit
46ea89bf9a
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      apt-pkg/deb/dpkgpm.cc

+ 3 - 1
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))
 	 if (unlikely(Ent->d_type != DT_LNK && Ent->d_type != DT_UNKNOWN))
 	    continue;
 	    continue;
 #endif
 #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;
 	    break;
       }
       }
       closedir(D);
       closedir(D);