public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work009-orig)] libstdc++: Fix build for targets without lstat [PR 94681] Date: Mon, 10 Aug 2020 21:18:16 +0000 (GMT) [thread overview] Message-ID: <20200810211816.BEB413857C47@sourceware.org> (raw) https://gcc.gnu.org/g:5b065f0563262a0d6cd1fea8426913bfdd841301 commit 5b065f0563262a0d6cd1fea8426913bfdd841301 Author: Jonathan Wakely <jwakely@redhat.com> Date: Mon Aug 10 18:58:14 2020 +0100 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. Diff: --- libstdc++-v3/src/c++17/fs_ops.cc | 2 +- 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 c685b1824f9..2cb26e4605b 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 8c8854bf28e..a1138490b3e 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;
reply other threads:[~2020-08-10 21:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200810211816.BEB413857C47@sourceware.org \ --to=meissner@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).