diff options
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 6555f1f511..f249e1e8cb 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7044,14 +7044,20 @@ static PyObject * posix_unsetenv(PyObject *self, PyObject *args) { char *s1; +#ifndef HAVE_BROKEN_UNSETENV int err; +#endif if (!PyArg_ParseTuple(args, "s:unsetenv", &s1)) return NULL; +#ifdef HAVE_BROKEN_UNSETENV + unsetenv(s1); +#else err = unsetenv(s1); if (err) return posix_error(); +#endif /* Remove the key from posix_putenv_garbage; * this will cause it to be collected. This has to |