diff options
author | Alexandre Oliva <oliva@adacore.com> | 2022-06-27 10:34:16 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2022-06-27 10:34:16 -0300 |
commit | 486893b1d325d22d54c1380937943913a7501f91 (patch) | |
tree | 56c01059b4766fe3d08c3f1fd6ee52cc030f64e9 | |
parent | ca35ebaec8369b0c722d82e1f81687ba52a6e43f (diff) | |
download | gcc-486893b1d325d22d54c1380937943913a7501f91.zip gcc-486893b1d325d22d54c1380937943913a7501f91.tar.gz gcc-486893b1d325d22d54c1380937943913a7501f91.tar.bz2 |
libstdc++: check for openat with dirfd in std::filesystem
In the recent patch to check for openat, I missed an occurrence of
dirfd in std::filesystem.
for libstdc++-v3/ChangeLog
* src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
_GLIBCXX_HAVE_OPENAT.
-rw-r--r-- | libstdc++-v3/src/c++17/fs_dir.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/src/c++17/fs_dir.cc b/libstdc++-v3/src/c++17/fs_dir.cc index c67fe76..25b33ba 100644 --- a/libstdc++-v3/src/c++17/fs_dir.cc +++ b/libstdc++-v3/src/c++17/fs_dir.cc @@ -124,7 +124,7 @@ struct fs::_Dir : _Dir_base dir_and_pathname() const noexcept { const fs::path& p = entry.path(); -#if _GLIBCXX_HAVE_DIRFD +#if _GLIBCXX_HAVE_DIRFD && _GLIBCXX_HAVE_OPENAT if (!p.empty()) return {::dirfd(this->dirp), std::prev(p.end())->c_str()}; #endif |