This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix calling of autodoc.pl in Win32 nmake Makefile
[perl5.git] / util.c
diff --git a/util.c b/util.c
index ea84cda..b170b2a 100644 (file)
--- a/util.c
+++ b/util.c
@@ -4102,6 +4102,7 @@ Perl_getcwd_sv(pTHX_ register SV *sv)
 
     for (;;) {
        DIR *dir;
+       int namelen;
        odev = cdev;
        oino = cino;
 
@@ -4124,9 +4125,9 @@ Perl_getcwd_sv(pTHX_ register SV *sv)
 
        while ((dp = PerlDir_read(dir)) != NULL) {
 #ifdef DIRNAMLEN
-           const int namelen = dp->d_namlen;
+           namelen = dp->d_namlen;
 #else
-           const int namelen = strlen(dp->d_name);
+           namelen = strlen(dp->d_name);
 #endif
            /* skip . and .. */
            if (SV_CWD_ISDOT(dp)) {