summaryrefslogtreecommitdiff
path: root/ext/Cwd
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Cwd')
-rw-r--r--ext/Cwd/Cwd.xs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs
index 82b89ac16b..be9427bc41 100644
--- a/ext/Cwd/Cwd.xs
+++ b/ext/Cwd/Cwd.xs
@@ -183,7 +183,9 @@ loop:
#endif
/* It's okay if the close fails, what's an fd more or less? */
+#ifdef HAS_FCHDIR
(void)close(fd);
+#endif
return (resolved);
err1: serrno = errno;