diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index 1770d73..89fccfd 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -4229,7 +4229,7 @@ GHC_INLINE path current_path(std::error_code& ec) } return path(std::wstring(buffer.get()), path::native_format); #elif defined(__GLIBC__) - std::unique_ptr buffer { ::getcwd(NULL, 0), std::free }; + std::unique_ptr buffer { ::get_current_dir_name(), std::free }; if (buffer == nullptr) { ec = detail::make_system_error(); return path();