summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dosish.h4
-rw-r--r--perl.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/dosish.h b/dosish.h
index 91228510c9..c092b4e320 100644
--- a/dosish.h
+++ b/dosish.h
@@ -105,6 +105,10 @@
/* Don't go reading from /dev/urandom */
#define PERL_NO_DEV_RANDOM
+#ifdef WIN32
+# define NO_ENVIRON_ARRAY
+#endif
+
/*
* ex: set ts=8 sts=4 sw=4 et:
*/
diff --git a/perl.c b/perl.c
index 7f877064cd..9bd4b3ed26 100644
--- a/perl.c
+++ b/perl.c
@@ -4589,7 +4589,7 @@ S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env)
hv = GvHVn(PL_envgv);
hv_magic(hv, NULL, PERL_MAGIC_env);
#ifndef PERL_MICRO
-#ifdef USE_ENVIRON_ARRAY
+#if defined(USE_ENVIRON_ARRAY) || defined(WIN32)
/* Note that if the supplied env parameter is actually a copy
of the global environ then it may now point to free'd memory
if the environment has been modified since. To avoid this