summaryrefslogtreecommitdiff
path: root/ext/Cwd/Cwd.xs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Cwd/Cwd.xs')
-rw-r--r--ext/Cwd/Cwd.xs8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs
index be9427bc41..b6f27b8d09 100644
--- a/ext/Cwd/Cwd.xs
+++ b/ext/Cwd/Cwd.xs
@@ -194,7 +194,11 @@ err1: serrno = errno;
#else
(void)chdir(wd);
#endif
-err2: (void)close(fd);
+
+err2:
+#ifdef HAS_FCHDIR
+ (void)close(fd);
+#endif
errno = serrno;
return (NULL);
#endif
@@ -209,7 +213,7 @@ fastcwd()
PPCODE:
{
dXSTARG;
- sv_getcwd(TARG);
+ getcwd_sv(TARG);
XSprePUSH; PUSHTARG;
}