diff options
author | Vladimir Vishnevsky <vv.os.swe@gmail.com> | 2021-02-09 10:25:38 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-02-09 12:31:52 +0000 |
commit | adeaa43ad3bd8004c2521e1fb3bb0e08be33234b (patch) | |
tree | 413071c501d999139cab95a86474bb5e17819d2b | |
parent | 396cc31317ebad416e234dfa5f85d42585d32437 (diff) | |
download | gcc-adeaa43ad3bd8004c2521e1fb3bb0e08be33234b.zip gcc-adeaa43ad3bd8004c2521e1fb3bb0e08be33234b.tar.gz gcc-adeaa43ad3bd8004c2521e1fb3bb0e08be33234b.tar.bz2 |
libstdc++: Fix build failure for targets without unistd.h
The patch fixes build issues occurring if build parameter
"--enable-cstdio=stdio_pure" is specified and no unistd.h is
present in the environment.
libstdc++-v3/ChangeLog:
* include/ext/stdio_sync_filebuf.h: Remove unused <unistd.h>.
* src/c++17/fs_ops.cc (fs::permissions): Qualify mode_t.
-rw-r--r-- | libstdc++-v3/include/ext/stdio_sync_filebuf.h | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/c++17/fs_ops.cc | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/libstdc++-v3/include/ext/stdio_sync_filebuf.h b/libstdc++-v3/include/ext/stdio_sync_filebuf.h index 178b471..90765e5 100644 --- a/libstdc++-v3/include/ext/stdio_sync_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_sync_filebuf.h @@ -32,7 +32,6 @@ #pragma GCC system_header #include <streambuf> -#include <unistd.h> #include <cstdio> #include <bits/c++io.h> // For __c_file #include <bits/move.h> // For __exchange diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc index 72755c9..04a559a 100644 --- a/libstdc++-v3/src/c++17/fs_ops.cc +++ b/libstdc++-v3/src/c++17/fs_ops.cc @@ -1130,7 +1130,7 @@ fs::permissions(const path& p, perms prms, perm_options opts, #else if (nofollow && is_symlink(st)) ec = std::make_error_code(std::errc::not_supported); - else if (posix::chmod(p.c_str(), static_cast<mode_t>(prms))) + else if (posix::chmod(p.c_str(), static_cast<posix::mode_t>(prms))) err = errno; #endif |