diff --git a/OSBindings/SDL/main.cpp b/OSBindings/SDL/main.cpp index 60620adb3..309eb725a 100644 --- a/OSBindings/SDL/main.cpp +++ b/OSBindings/SDL/main.cpp @@ -444,7 +444,12 @@ std::string final_path_component(const std::string &path) { Executes @c command and returns its STDOUT. */ std::string system_get(const char *command) { - std::unique_ptr pipe(popen(command, "r"), pclose); + struct pcloser { + void operator()(FILE *file) { + pclose(dir); + } + }; + std::unique_ptr pipe(popen(command, "r")); if(!pipe) return ""; std::string result;