closedir: Avoid warning on mingw.
authorBruno Haible <bruno@clisp.org>
Fri, 4 Nov 2011 11:03:48 +0000 (12:03 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 4 Nov 2011 11:03:48 +0000 (12:03 +0100)
* lib/closedir.c: Include <unistd.h>.

ChangeLog
lib/closedir.c

index ecdeedf..56cced3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-11-04  Bruno Haible  <bruno@clisp.org>
 
+       closedir: Avoid warning on mingw.
+       * lib/closedir.c: Include <unistd.h>.
+
+2011-11-04  Bruno Haible  <bruno@clisp.org>
+
        New module 'fstatat', split off from module 'openat'.
        * lib/openat.h (statat, lstatat): Enable only if GNULIB_FSTATAT is
        defined.
index 700d60e..0fdce18 100644 (file)
 /* Specification.  */
 #include <dirent.h>
 
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
 #if HAVE_CLOSEDIR
 
 /* Override closedir(), to keep track of the open file descriptors.