diff --git a/libraries/libfc/include/fc/io/cfile.hpp b/libraries/libfc/include/fc/io/cfile.hpp index c09adf894d..9c9f97e637 100644 --- a/libraries/libfc/include/fc/io/cfile.hpp +++ b/libraries/libfc/include/fc/io/cfile.hpp @@ -19,7 +19,11 @@ namespace fc { namespace detail { - using unique_file = std::unique_ptr; + static void close_file(FILE* f) { + fclose(f); + } + + using unique_file = std::unique_ptr; } class cfile_datastream; @@ -32,7 +36,7 @@ class cfile { friend class temp_cfile; public: cfile() - : _file(nullptr, &fclose) + : _file(nullptr, &detail::close_file) {} cfile(cfile&& other)