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.
This commit is contained in:
parent
396cc31317
commit
adeaa43ad3
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user