fix closer

This commit is contained in:
Andrey Zimin 2024-05-15 09:17:03 +03:00
parent c021852e28
commit b14e81244d

View File

@ -54,7 +54,7 @@ namespace hack::utils
{
std::string result;
std::array<char, 1024> buffer;
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose);
std::unique_ptr<FILE, int(*)(FILE*)> pipe(popen(cmd.c_str(), "r"), pclose);
if (!pipe) throw std::runtime_error("bash cmd failed");