summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/os_calls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index 80b2d235..16b89201 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -2907,8 +2907,12 @@ g_clearenv(void)
{
#if defined(_WIN32)
#else
+#if defined(BSD)
+ environ[0] = 0;
+#else
environ = 0;
#endif
+#endif
}
/*****************************************************************************/