Index: libcxx/src/filesystem/operations.cpp =================================================================== --- libcxx/src/filesystem/operations.cpp +++ libcxx/src/filesystem/operations.cpp @@ -1110,7 +1110,7 @@ path __current_path(error_code* ec) { ErrorHandler err("current_path", ec); -#if defined(_LIBCPP_WIN32API) +#if defined(_LIBCPP_WIN32API) || defined(__GLIBC__) || defined(__APPLE__) // Common extension outside of POSIX getcwd() spec, without needing to // preallocate a buffer. Also supported by a number of other POSIX libcs. int size = 0;