From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id F28FE398641E; Tue, 18 Aug 2020 01:35:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F28FE398641E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597714539; bh=ZermV4XbewSbeAAXn2Ov6mGenW3XGUwW+dMUFQyhyj4=; h=From:To:Subject:Date:From; b=J6F01lCL48V7V0LDf0+auuklQCHowRxsu0U4Jib/ARgAVhz4R4ysLZ3TcbavFCfFA aXs9cnWNHu7CIsZ13zP8uvmM0YfVG11CTuLkLJ7F8Eli70I+T34Jhf6AlYnxUhx4HE mdQQsOPveFQUemPtDaCpqP6HmbLy+HKieql0c4jk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Giuliano Belinassi To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/giulianob/heads/autopar_rebase2)] libstdc++: Fix build for targets without lstat [PR 94681] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/users/giulianob/heads/autopar_rebase2 X-Git-Oldrev: cd92527c2e7cdf7594d6b3b48dd77017888b04f0 X-Git-Newrev: 753f39b848cb91d587fa13600f32e0673c416cc7 Message-Id: <20200818013539.F28FE398641E@sourceware.org> Date: Tue, 18 Aug 2020 01:35:39 +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: Tue, 18 Aug 2020 01:35:40 -0000 https://gcc.gnu.org/g:753f39b848cb91d587fa13600f32e0673c416cc7 commit 753f39b848cb91d587fa13600f32e0673c416cc7 Author: Jonathan Wakely 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;