Ticket #59808: patch-cmake-3-16-libuv-tiger.diff

File patch-cmake-3-16-libuv-tiger.diff, 1.4 KB (added by ballapete (Peter "Pete" Dyballa), 5 years ago)

Patch file for cmake @3.16's Utilities/cmlibuv/src/unix/fs.c

  • Utilities/cmlibuv/src/unix/core.c

    old new  
    13061306  if (name == NULL)
    13071307    return UV_EINVAL;
    13081308
     1309#if ( defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1050)
     1310    unsetenv(name);
     1311#else
    13091312  if (unsetenv(name) != 0)
    13101313    return UV__ERR(errno);
    1311 
     1314#endif
    13121315  return 0;
    13131316}
    13141317
  • Utilities/cmlibuv/src/unix/fs.c

    old new  
    5959# include <sys/sendfile.h>
    6060#endif
    6161
    62 #if defined(__APPLE__)
    63 # include <sys/sysctl.h>
     62#if ( defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 )
     63 # include <copyfile.h>
    6464#elif defined(__linux__) && !defined(FICLONE)
    6565# include <sys/ioctl.h>
    6666# define FICLONE _IOW(0x94, 9, int)
     
    743743
    744744    return -1;
    745745  }
    746 #elif defined(__APPLE__)           || \
     746#elif defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 || \
    747747      defined(__DragonFly__)       || \
    748748      defined(__FreeBSD__)         || \
    749749      defined(__FreeBSD_kernel__)
     
    10551055  dst->st_blksize = src->st_blksize;
    10561056  dst->st_blocks = src->st_blocks;
    10571057
    1058 #if defined(__APPLE__)
     1058#if ( defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
    10591059  dst->st_atim.tv_sec = src->st_atimespec.tv_sec;
    10601060  dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec;
    10611061  dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec;