]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix std::filesystem build failure for Windows
authorJonathan Wakely <jwakely@redhat.com>
Fri, 4 Feb 2022 23:54:17 +0000 (23:54 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 4 Oct 2023 11:10:04 +0000 (12:10 +0100)
The std::filesystem code needs to use posix::DIR not ::DIR, as that is
an alias for _WDIR on Windows.

libstdc++-v3/ChangeLog:

* src/filesystem/dir-common.h (_Dir_base::openat): Change return
type to use portable posix::DIR alias.

(cherry picked from commit 6e3419529d4e3284172f9965b4993b9f184f34d2)

libstdc++-v3/src/filesystem/dir-common.h

index 33892c49bf28f986a86593367ae6145d47b5a72a..bc7348817827bde0701370840ce7b60232410c2a 100644 (file)
@@ -173,7 +173,7 @@ struct _Dir_base
     return true;
   }
 
-  static ::DIR*
+  static posix::DIR*
   openat(int fd, const posix::char_type* pathname, bool nofollow)
   {
 #if _GLIBCXX_HAVE_FDOPENDIR && defined O_RDONLY && defined O_DIRECTORY \