summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 13:28:04 +0100
committerнаб <nabijaczleweli@nabijaczleweli.xyz>2024-11-12 13:46:06 +0100
commit78e503bc1d79bc4fc29bc9cbe1dfb68ae4d16acf (patch)
tree67beaeec79a01ea97785bc5ad1476f3c2315e107 /apt-pkg/acquire.cc
parentc87f3bdd1790bb75447c2ec8f95e5e07bdce58d5 (diff)
Turn unique_ptr<decltype(fclose and free)> into real deleter types (warnings now, UB in C++20)
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 7ebfa4ffe..f367e4310 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -605,7 +605,7 @@ static bool IsAccessibleBySandboxUser(std::string const &filename, bool const Re
char const * const filetag = ".apt-acquire-privs-test.XXXXXX";
std::string const tmpfile_tpl = flCombine(dirname, filetag);
- std::unique_ptr<char, decltype(std::free) *> tmpfile { strdup(tmpfile_tpl.c_str()), std::free };
+ std::unique_ptr<char, FreeDeleter> tmpfile { strdup(tmpfile_tpl.c_str()) };
int const fd = mkstemp(tmpfile.get());
if (fd == -1 && errno == EACCES)
return false;