Vladimir V writes: > Hello, > > I finally managed to test building for AVR with Keith's patch and > unistd.h removed (to enforce usage of stabs in filesystem). > > I identified a couple of minor build issues that are obvious from the > attached patch, Could you please have a look? They work with AVR target > and doesn't seem to cause regressions for x64 build. Hrm. Removing unistd.h from an installed file might affect applications using that file, so that doesn't seem ideal. Picolibc has a unistd.h to define the relevant interfaces, even though it doesn't require them. Perhaps avrlibc could do the same? Or even an empty file that would satisfy this requirement? > --- 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(prms))) > + else if (posix::chmod(p.c_str(), static_cast(prms))) > err = errno; > #endif I'm afraid I don't understand what this piece does without studying the underlying code a bunch. But, if it's just namespace stuff in an internal implementation file, that seems fine to me. -- -keith