From: Rafael Garcia-Suarez Date: Sun, 1 Mar 2009 23:13:34 +0000 (+0100) Subject: Make util.c compile on systems without getcwd() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f56ed502c9950029115cee628809882d9174d69f;p=p5sagit%2Fp5-mst-13.2.git Make util.c compile on systems without getcwd() --- diff --git a/util.c b/util.c index ea84cda..b170b2a 100644 --- 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)) {