diff options
Diffstat (limited to 'dbus/dbus-sysdeps.c')
-rw-r--r-- | dbus/dbus-sysdeps.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index c76603a8..1a736e42 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -185,7 +185,19 @@ _dbus_getenv (const char *varname) dbus_bool_t _dbus_clearenv (void) { - return (clearenv () == 0); + dbus_bool_t rc = TRUE; + +#ifdef HAVE_CLEARENV + if (clearenv () != 0) + rc = FALSE; +#else + extern char **environ; + + if (environ != NULL) + environ[0] = NULL; +#endif + + return rc; } /* |