@@ -1400,20 +1400,26 @@ namespace detail
1400
1400
else if (prms & remove_perms)
1401
1401
prms = current_status.permissions () & ~prms;
1402
1402
1403
- // Mac OS X Lion and some other platforms don't support fchmodat().
1404
- // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher,
1405
- // and a runtime check is too much trouble.
1406
- // Linux does not support permissions on symbolic links and has no plans to
1403
+
1404
+ // OS X <10.10, iOS <8.0 and some other platforms don't support fchmodat().
1405
+ // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher,
1406
+ // and a runtime check is too much trouble.
1407
+ // Linux does not support permissions on symbolic links and has no plans to
1407
1408
// support them in the future. The chmod() code is thus more practical,
1408
1409
// rather than always hitting ENOTSUP when sending in AT_SYMLINK_NO_FOLLOW.
1409
1410
// - See the 3rd paragraph of
1410
1411
// "Symbolic link ownership, permissions, and timestamps" at:
1411
1412
// "http://man7.org/linux/man-pages/man7/symlink.7.html"
1412
1413
// - See the fchmodat() Linux man page:
1413
1414
// "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
1414
- # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
1415
- && !(defined (__SUNPRO_CC) || defined (__sun) || defined (sun)) \
1416
- && !(defined (linux) || defined (__linux) || defined (__linux__))
1415
+
1416
+ # if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
1417
+ && !(defined (__SUNPRO_CC) || defined (__sun) || defined (sun)) \
1418
+ && !(defined (linux) || defined (__linux) || defined (__linux__)) \
1419
+ && !(defined (__MAC_OS_X_VERSION_MIN_REQUIRED) \
1420
+ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 ) \
1421
+ && !(defined (__IPHONE_OS_VERSION_MIN_REQUIRED) \
1422
+ && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 )
1417
1423
if (::fchmodat (AT_FDCWD, p.c_str (), mode_cast (prms),
1418
1424
!(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
1419
1425
# else // fallback if fchmodat() not supported
0 commit comments