diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-08-10 18:58:14 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-08-10 19:12:12 +0100 |
commit | 5b065f0563262a0d6cd1fea8426913bfdd841301 (patch) | |
tree | cccad81121cc99df6c047824b0c7038cfe4c27a9 /libstdc++-v3/src | |
parent | ed11f7e84bcae89f486f5023e566726a7faa7dd4 (diff) | |
download | gcc-5b065f0563262a0d6cd1fea8426913bfdd841301.zip gcc-5b065f0563262a0d6cd1fea8426913bfdd841301.tar.gz gcc-5b065f0563262a0d6cd1fea8426913bfdd841301.tar.bz2 |
libstdc++: Fix build for targets without lstat [PR 94681]
libstdc++-v3/ChangeLog:
PR libstdc++/94681
* src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
of calling ::lstat directly.
* src/filesystem/ops.cc (read_symlink): Likewise.
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++17/fs_ops.cc | 2 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/ops.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc index c685b18..2cb26e4 100644 --- a/libstdc++-v3/src/c++17/fs_ops.cc +++ b/libstdc++-v3/src/c++17/fs_ops.cc @@ -1175,7 +1175,7 @@ fs::path fs::read_symlink(const path& p, error_code& ec) path result; #if defined(_GLIBCXX_HAVE_READLINK) && defined(_GLIBCXX_HAVE_SYS_STAT_H) stat_type st; - if (::lstat(p.c_str(), &st)) + if (posix::lstat(p.c_str(), &st)) { ec.assign(errno, std::generic_category()); return result; diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index 8c8854b..a113849 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -993,7 +993,7 @@ fs::path fs::read_symlink(const path& p [[gnu::unused]], error_code& ec) path result; #if defined(_GLIBCXX_HAVE_READLINK) && defined(_GLIBCXX_HAVE_SYS_STAT_H) stat_type st; - if (::lstat(p.c_str(), &st)) + if (posix::lstat(p.c_str(), &st)) { ec.assign(errno, std::generic_category()); return result; |