summaryrefslogtreecommitdiff
path: root/lib/fchdir.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-10-13 09:25:30 -0600
committerEric Blake <ebb9@byu.net>2009-10-14 06:25:56 -0600
commit1506e4147b4177990e6cde062536ea8bc63f9588 (patch)
tree746fc88c739a978ffdec47b1b52221bbe3a7fe06 /lib/fchdir.c
parent20bdd2f41cb9d43df6dd0cfe361ac73a0e8148f9 (diff)
downloadgnulib-1506e4147b4177990e6cde062536ea8bc63f9588.tar.gz
fchdir: avoid infinite recursion in mingw
rpl_fstat, needed only on mingw when using fchdir, should not call itself. * lib/fchdir.c (rpl_fstat): Call system fstat, rather than recursing. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/fchdir.c')
-rw-r--r--lib/fchdir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/fchdir.c b/lib/fchdir.c
index 19f02c34c5..16b17b4e84 100644
--- a/lib/fchdir.c
+++ b/lib/fchdir.c
@@ -217,6 +217,7 @@ _gl_directory_name (int fd)
rpl_open() used a dummy file to work around an open() that can't
normally visit directories. */
#if REPLACE_OPEN_DIRECTORY
+# undef fstat
int
rpl_fstat (int fd, struct stat *statbuf)
{