diff --git a/src/Yann/ExcludeSats.cpp b/src/Yann/ExcludeSats.cpp index 3a13833843..8f3ea1e173 100755 --- a/src/Yann/ExcludeSats.cpp +++ b/src/Yann/ExcludeSats.cpp @@ -223,7 +223,12 @@ std::string execCmdOutput(const char* cmd) { std::array buffer; std::string result; - std::unique_ptr pipe(popen(cmd, "r"), pclose); + + struct PipeCloser { + void operator()(FILE *p) const { pclose(p); } + }; + + std::unique_ptr pipe(popen(cmd, "r")); if (!pipe) { throw std::runtime_error("popen() failed!"); }