Ticket #6659: boost-1.49.0-dont_use_fchmodat.patch

File boost-1.49.0-dont_use_fchmodat.patch, 1.0 KB (added by Duncan Exon Smith <duncanphilipnorman@…>, 11 years ago)

Patch to remove unnecessary use of poorly supported fchmodat().

  • boost_1_49_0/libs/filesystem/v3/src/operations.cpp

    diff -r --unified boost_1_49_0/libs/filesystem/v3/src/operations.cpp boost_1_49_0/libs/filesystem/v3/src/operations.cpp
     
    13851385    else if (prms & remove_perms)
    13861386      prms = current_status.permissions() & ~prms;
    13871387
    1388     // Mac OS X Lion and some other platforms don't support fchmodat() 
    1389 #   if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
    1390       && (!defined(__SUNPRO_CC) || __SUNPRO_CC > 0x5100)
    1391       if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
    1392            !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
    1393 #   else  // fallback if fchmodat() not supported
    1394       if (::chmod(p.c_str(), mode_cast(prms)))
    1395 #   endif
     1388    // Don't use fchmodat() since AT_SYMLINK_NOFOLLOW is not implemented on Linux
     1389    if (::chmod(p.c_str(), mode_cast(prms)))
    13961390    {
    13971391      if (ec == 0)
    13981392      BOOST_FILESYSTEM_THROW(filesystem_error(