From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id ECC093858D20; Sat, 5 Feb 2022 00:09:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECC093858D20 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-7065] libstdc++: Fix std::filesystem build failure for Windows X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 0d1aabb60ec66bffbc9a3269f6ca85150f259564 X-Git-Newrev: 6e3419529d4e3284172f9965b4993b9f184f34d2 Message-Id: <20220205000929.ECC093858D20@sourceware.org> Date: Sat, 5 Feb 2022 00:09:29 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2022 00:09:30 -0000 https://gcc.gnu.org/g:6e3419529d4e3284172f9965b4993b9f184f34d2 commit r12-7065-g6e3419529d4e3284172f9965b4993b9f184f34d2 Author: Jonathan Wakely Date: Fri Feb 4 23:54:17 2022 +0000 libstdc++: Fix std::filesystem build failure for Windows 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. Diff: --- libstdc++-v3/src/filesystem/dir-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/src/filesystem/dir-common.h b/libstdc++-v3/src/filesystem/dir-common.h index ee4f33b6bc1..0b7665a3f70 100644 --- a/libstdc++-v3/src/filesystem/dir-common.h +++ b/libstdc++-v3/src/filesystem/dir-common.h @@ -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 \