summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index bf628b2377..5a9ce2ce4a 100644
--- a/perlio.c
+++ b/perlio.c
@@ -3647,8 +3647,14 @@ char *
PerlIO_getname(PerlIO *f, char *buf)
{
dTHX;
+ char *name = NULL;
+#ifdef VMS
+ FILE *stdio = PerlIOSelf(f,PerlIOStdio)->stdio;
+ if (stdio) name = fgetname(stdio, buf);
+#else
Perl_croak(aTHX_ "Don't know how to get file name");
- return NULL;
+#endif
+ return name;
}