[MacPorts] #57551: cmake @3.12.4 does not build on Mac OS X 10.4.11, Tiger, because it does not knaw hat unsetenv() does no exist here
MacPorts
noreply at macports.org
Sat Nov 10 00:41:25 UTC 2018
#57551: cmake @3.12.4 does not build on Mac OS X 10.4.11, Tiger, because it does
not knaw hat unsetenv() does no exist here
------------------------+--------------------
Reporter: ballapete | Owner: (none)
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: duplicate | Keywords: tiger
Port: cmake |
------------------------+--------------------
Comment (by ballapete):
Replying to [comment:1 michaelld]:
> @kencu: Is this a function we can get into "macports-legacy-support"?
Seems like an obvious addition!
Don't know. The code of the function is:
{{{
int uv_os_unsetenv(const char* name) {
if (name == NULL)
return UV_EINVAL;
if (unsetenv(name) != 0)
return UV__ERR(errno);
return 0;
}
}}}
My patch looks simply like this:
{{{
--- Utilities/cmlibuv/src/unix/core.c.orig 2018-11-02
13:15:50.000000000 +0100
+++ Utilities/cmlibuv/src/unix/core.c 2018-11-10 01:31:17.000000000
+0100
@@ -1293,8 +1293,13 @@
if (name == NULL)
return UV_EINVAL;
+ /* Mac OS X 10.4, Tiger, has void unsetenv() */
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
if (unsetenv(name) != 0)
return UV__ERR(errno);
+#else
+ unsetenv(name);
+#endif
return 0;
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57551#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list