summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-02 00:13:34 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-02 00:13:34 +0100
commitf56ed502c9950029115cee628809882d9174d69f (patch)
treea9ecc78bed89b26e6f070b7b586de25aff6a0358 /util.c
parent1c058b48febcd9109f3c815ca5b3653e08c9818a (diff)
downloadperl-f56ed502c9950029115cee628809882d9174d69f.tar.gz
Make util.c compile on systems without getcwd()
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util.c b/util.c
index ea84cdadab..b170b2afb2 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)) {