Commit 6dd92709 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix compilation if getenv() is missing

parent 1abee26e
......@@ -27,6 +27,7 @@
int setenv (const char *name, const char *value, int override)
{
#ifdef HAVE_GETENV
if (override == 0 && getenv (name) != NULL)
return 0;
......@@ -40,6 +41,9 @@ int setenv (const char *name, const char *value, int override)
sprintf (var, "%s=%s", name, value);
/* This leaks memory. This is unavoidable. */
return putenv (var);
#else
return -1;
#endif
}
int unsetenv (const char *name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment