diff --git a/boost/libs/filesystem/src/operations.cpp b/boost/libs/filesystem/src/operations.cpp index c9331f9..a5f0c79 100644 --- a/boost/libs/filesystem/src/operations.cpp +++ b/boost/libs/filesystem/src/operations.cpp @@ -1400,7 +1400,7 @@ namespace detail else if (prms & remove_perms) prms = current_status.permissions() & ~prms; - // Mac OS X Lion and some other platforms don't support fchmodat(). + // OS X <10.10, iOS <8.0 and some other platforms don't support fchmodat(). // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher, // and a runtime check is too much trouble. // Linux does not support permissions on symbolic links and has no plans to @@ -1413,7 +1413,11 @@ namespace detail // "http://man7.org/linux/man-pages/man2/fchmodat.2.html" # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \ && !(defined(__SUNPRO_CC) || defined(__sun) || defined(sun)) \ - && !(defined(linux) || defined(__linux) || defined(__linux__)) + && !(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) if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms), !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW)) # else // fallback if fchmodat() not supported