On Tue, 28 Jun 2022 at 15:24, Jonathan Wakely via Libstdc++ wrote: > --- a/libstdc++-v3/src/filesystem/dir-common.h > +++ b/libstdc++-v3/src/filesystem/dir-common.h > @@ -25,6 +25,7 @@ > #ifndef _GLIBCXX_DIR_COMMON_H > #define _GLIBCXX_DIR_COMMON_H 1 > > +#include // uint32_t > #include // strcmp > #include > #if _GLIBCXX_FILESYSTEM_IS_WINDOWS > @@ -91,12 +92,50 @@ is_permission_denied_error(int e) > > struct _Dir_base > { > + // As well as the full pathname (including the directory iterator's path) > + // this type contains a file descriptor for a directory and a second pathname > + // relative to that directory. The file descriptor and relative pathname > + // can be used with POSIX openat and unlinkat. > + struct _At_path > + { > + // No file descriptor given, so interpret the pathname relative to the CWD. > + _At_path(const char* p) noexcept I forgot to consistently use the char_type alias to support wchar_t paths on Windows. Fixed by the attached patch. Tested x86_64-linux and x86_64-mingw32, pushed to trunk.