On mingw, I'm seeing this gcc warning: closedir.c: In function `rpl_closedir': closedir.c:60: warning: implicit declaration of function `_gl_unregister_fd'
This fixes it. 2011-11-04 Bruno Haible <br...@clisp.org> closedir: Avoid warning on mingw. * lib/closedir.c: Include <unistd.h>. *** lib/closedir.c.orig Fri Nov 4 12:02:36 2011 --- lib/closedir.c Fri Nov 4 12:00:25 2011 *************** *** 19,24 **** --- 19,28 ---- /* Specification. */ #include <dirent.h> + #if REPLACE_FCHDIR + # include <unistd.h> + #endif + #if HAVE_CLOSEDIR /* Override closedir(), to keep track of the open file descriptors. -- In memoriam Yitzhak Rabin <http://en.wikipedia.org/wiki/Yitzhak_Rabin>