This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Missed one statbuf declaration in 45a23732c73."
[perl5.git] / util.c
diff --git a/util.c b/util.c
index 0800f38..967c9ef 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3245,7 +3245,6 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
     I32 len = 0;
     int retval;
     char *bufend;
-    Stat_t statbuf;
 #if defined(DOSISH) && !defined(OS2)
 #  define SEARCH_EXTS ".bat", ".cmd", NULL
 #  define MAX_EXT_LEN 4
@@ -3338,6 +3337,7 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
            DEBUG_p(PerlIO_printf(Perl_debug_log,
                                  "Looking for %s\n",cur));
            {
+               Stat_t statbuf;
                if (PerlLIO_stat(cur,&statbuf) >= 0
                    && !S_ISDIR(statbuf.st_mode)) {
                    dosearch = 0;