Fix build failure with MinGW

Message ID 6050446.nTtzE1YJS2@polaris
State New
Headers show
Series
  • Fix build failure with MinGW
Related show

Commit Message

Eric Botcazou March 30, 2019, 11:56 a.m.
Tested on x86_64-pc-mingw32, OK for the mainline?


2019-03-30  Eric Botcazou  <ebotcazou@adacore.com>

	* src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.

-- 
Eric Botcazou

Comments

Jonathan Wakely March 30, 2019, 12:57 p.m. | #1
On Sat, 30 Mar 2019 at 11:56, Eric Botcazou wrote:
>

> Tested on x86_64-pc-mingw32, OK for the mainline?


OK, thanks.

Patch

diff --git libstdc++-v3/src/c++17/fs_ops.cc libstdc++-v3/src/c++17/fs_ops.cc
index 3ff0ded1c66..5ca523826cb 100644
--- libstdc++-v3/src/c++17/fs_ops.cc
+++ libstdc++-v3/src/c++17/fs_ops.cc
@@ -1127,7 +1127,7 @@  fs::permissions(const path& p, perms prms, perm_options opts,
     err = errno;
 #else
   if (nofollow && is_symlink(st))
-    ec = std::make_error_code(std::errc::operation_not_supported);
+    ec = std::make_error_code(std::errc::not_supported);
   else if (posix::chmod(p.c_str(), static_cast<mode_t>(prms)))
     err = errno;
 #endif