Worked around a compilation problem on RTEMS.

Closes https://github.com/boostorg/filesystem/pull/240.
This commit is contained in:
Andrey Semashev
2022-07-07 23:43:07 +03:00
parent 7cd11c770b
commit 945c2ecf11
2 changed files with 2 additions and 0 deletions

View File

@@ -43,6 +43,7 @@
<ul>
<li>On Windows, added a fallback implementation for querying file attributes in case if the file cannot be opened with <code>ERROR_ACCESS_DENIED</code> error. This may allow <code>status</code> and <code>symlink_status</code> to succeed for system files and directories that are not reparse points or symlinks. (<a href="https://github.com/boostorg/filesystem/issues/234">#234</a>)</li>
<li>On Windows, added a workaround for FAT/exFAT filesystems that produce <code>ERROR_INVALID_PARAMETER</code> when querying file attributes. This affected <code>status</code> and <code>symlink_status</code>, which reported that files do not exist, and directory iterators, which failed to construct, as well as other dependent operations. (<a href="https://github.com/boostorg/filesystem/issues/236">#236</a>, <a href="https://github.com/boostorg/filesystem/issues/237">#237</a>)</li>
<li>Worked around a compilation problem on <a href="https://www.rtems.org/">RTEMS</a>. (<a href="https://github.com/boostorg/filesystem/pull/240">#240</a>)</li>
</ul>
<h2>1.79.0</h2>

View File

@@ -3392,6 +3392,7 @@ void permissions(path const& p, perms prms, system::error_code* ec)
!(defined(linux) || defined(__linux) || defined(__linux__)) && \
!(defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000) && \
!(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000) && \
!(defined(__rtems__)) && \
!(defined(__QNX__) && (_NTO_VERSION <= 700))
if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms), !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
#else // fallback if fchmodat() not supported