On VMS, don't call flex_stat from my_flush as the latter may be
Craig A. Berry [Fri, 7 Mar 2008 13:48:58 +0000 (13:48 +0000)]
called during global destruction and the former checks hints flags
that depend on the interpreter's still existing.

p4raw-id: //depot/perl@33451

vms/vms.c

index 8f712b9..3f1fa5c 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -10433,7 +10433,7 @@ Perl_my_flush(pTHX_ FILE *fp)
     if ((res = fflush(fp)) == 0 && fp) {
 #ifdef VMS_DO_SOCKETS
        Stat_t s;
-       if (Fstat(fileno(fp), &s) == 0 && !S_ISSOCK(s.st_mode))
+       if (fstat(fileno(fp), (stat_t *)&s) == 0 && !S_ISSOCK(s.st_mode))
 #endif
            res = fsync(fileno(fp));
     }