changeset 16024:1529bb1a37a5

closedir: Avoid warning on mingw. * lib/closedir.c: Include <unistd.h>.
author Bruno Haible <bruno@clisp.org>
date Fri, 04 Nov 2011 12:03:48 +0100
parents dc33aa820898
children 8d9cce581f57
files ChangeLog lib/closedir.c
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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'.
--- a/lib/closedir.c
+++ b/lib/closedir.c
@@ -19,6 +19,10 @@
 /* Specification.  */
 #include <dirent.h>
 
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
 #if HAVE_CLOSEDIR
 
 /* Override closedir(), to keep track of the open file descriptors.