public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-7148] libstdc++: Fix build failure for targets without unistd.h
@ 2021-02-09 12:32 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-02-09 12:32 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:adeaa43ad3bd8004c2521e1fb3bb0e08be33234b
commit r11-7148-gadeaa43ad3bd8004c2521e1fb3bb0e08be33234b
Author: Vladimir Vishnevsky <vv.os.swe@gmail.com>
Date: Tue Feb 9 10:25:38 2021 +0000
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.
Diff:
---
libstdc++-v3/include/ext/stdio_sync_filebuf.h | 1 -
libstdc++-v3/src/c++17/fs_ops.cc | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/ext/stdio_sync_filebuf.h b/libstdc++-v3/include/ext/stdio_sync_filebuf.h
index 178b471957a..90765e55831 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 72755c98a5a..04a559ab1d6 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-09 12:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 12:32 [gcc r11-7148] libstdc++: Fix build failure for targets without unistd.h Jonathan Wakely
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).