* lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well.
* modules/opendir (Depends-on): Add unistd.
+2011-09-21 Bruno Haible <bruno@clisp.org>
+
+ opendir: Avoid compilation error on mingw.
+ * lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well.
+ * modules/opendir (Depends-on): Add unistd.
+
2011-09-21 Bruno Haible <bruno@clisp.org>
ftruncate tests: Avoid a test failure on mingw.
#include <dirent.h>
#include <errno.h>
+#include <stddef.h>
#if HAVE_OPENDIR
#else
-# include <stddef.h>
# include <stdlib.h>
# include "dirent-private.h"
#endif
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
DIR *
opendir (const char *dir_name)
{
dirent
largefile
filename [test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1]
+unistd [test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1]
configure.ac:
gl_FUNC_OPENDIR