summaryrefslogtreecommitdiff
path: root/os2/os2.c
diff options
context:
space:
mode:
Diffstat (limited to 'os2/os2.c')
-rw-r--r--os2/os2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/os2/os2.c b/os2/os2.c
index 017230ff0b..f8f4a82735 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -1139,12 +1139,15 @@ Xs_OS2_init()
OS2_Perl_data_t OS2_Perl_data;
void
-Perl_OS2_init()
+Perl_OS2_init(char **env)
{
char *shell;
settmppath();
OS2_Perl_data.xs_init = &Xs_OS2_init;
+ if (environ == NULL) {
+ environ = env;
+ }
if ( (shell = getenv("PERL_SH_DRIVE")) ) {
New(404, sh_path, strlen(SH_PATH) + 1, char);
strcpy(sh_path, SH_PATH);