Ticket #10591: boost-fs-fchmodat-darwin.patch

File boost-fs-fchmodat-darwin.patch, 1.5 KB (added by tiwoc@…, 7 years ago)
  • boost/libs/filesystem/src/operations.cpp

    diff --git a/boost/libs/filesystem/src/operations.cpp b/boost/libs/filesystem/src/operations.cpp
    index c9331f9..a5f0c79 100644
    a b namespace detail  
    14001400    else if (prms & remove_perms)
    14011401      prms = current_status.permissions() & ~prms;
    14021402
    1403     // Mac OS X Lion and some other platforms don't support fchmodat().
     1403    // OS X <10.10, iOS <8.0 and some other platforms don't support fchmodat().
    14041404    // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher,
    14051405    // and a runtime check is too much trouble.
    14061406    // Linux does not support permissions on symbolic links and has no plans to
    namespace detail  
    14131413    //   "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
    14141414#   if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
    14151415      && !(defined(__SUNPRO_CC) || defined(__sun) || defined(sun)) \
    1416       && !(defined(linux) || defined(__linux) || defined(__linux__))
     1416      && !(defined(linux) || defined(__linux) || defined(__linux__)) \
     1417      && !(defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \
     1418           && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000) \
     1419      && !(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) \
     1420           && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000)
    14171421      if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
    14181422           !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
    14191423#   else  // fallback if fchmodat() not supported