From: Eric Blake Date: Tue, 13 Oct 2009 15:25:30 +0000 (-0600) Subject: fchdir: avoid infinite recursion in mingw X-Git-Tag: v0.1~5319 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=1506e4147b4177990e6cde062536ea8bc63f9588;p=gnulib.git 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 --- diff --git a/ChangeLog b/ChangeLog index da301919b..e19038b3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-10-14 Eric Blake + fchdir: avoid infinite recursion in mingw + * lib/fchdir.c (rpl_fstat): Call system fstat, rather than + recursing. + test-stat-time: port to mingw * tests/test-stat-time.c (force_unlink): Return a value. (test_ctime) [W32]: Fix compilation error. diff --git a/lib/fchdir.c b/lib/fchdir.c index 19f02c34c..16b17b4e8 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) {