Ticket #55415: Tiger-patch-libuv-src-unix-core.c.diff

File Tiger-patch-libuv-src-unix-core.c.diff, 534 bytes (added by ballapete (Peter "Pete" Dyballa), 6 years ago)

To get a working unsetenv(), new version

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

    old new  
    12891289
    12901290
    12911291int uv_os_unsetenv(const char* name) {
     1292  /* Mac OS X before Leopard, 10.5, has void unsetenv */
     1293#if __MAC_OS_X_VERSION_MIN_REQUIRED > 1040
    12921294  if (unsetenv(name) != 0)
    12931295    return -errno;
    12941296
     1297#else
     1298  unsetenv(name);
     1299  if (getenv(name) != NULL)    /* if name still exists in environment, then no NULL pointer */
     1300    return -1;
     1301#endif
     1302
    12951303  return 0;
    12961304}
    12971305