aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/filesystem/ops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/src/filesystem/ops.cc')
-rw-r--r--libstdc++-v3/src/filesystem/ops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc
index b0a0f15..cc7117b 100644
--- a/libstdc++-v3/src/filesystem/ops.cc
+++ b/libstdc++-v3/src/filesystem/ops.cc
@@ -590,7 +590,7 @@ fs::create_hard_link(const path& to, const path& new_hard_link,
if (CreateHardLinkW(new_hard_link.c_str(), to.c_str(), NULL))
ec.clear();
else
- ec.assign((int)GetLastError(), system_category());
+ ec = __last_system_error();
#else
ec = std::make_error_code(std::errc::not_supported);
#endif
@@ -1062,7 +1062,7 @@ fs::remove(const path& p, error_code& ec) noexcept
return true;
}
else if (!ec)
- ec.assign((int)GetLastError(), system_category());
+ ec = __last_system_error();
}
else if (status_known(st))
ec.clear();