I did on 2011-09-12: > * lib/opendir.c: New file. This doesn't compile on mingw, because of NULL. Trivial fix:
2011-09-21 Bruno Haible <[email protected]> opendir: Avoid compilation error on mingw. * lib/opendir.c: Include <stddef.h> always. Include <unistd.h> as well. * modules/opendir (Depends-on): Add unistd. --- lib/opendir.c.orig Wed Sep 21 23:10:13 2011 +++ lib/opendir.c Wed Sep 21 23:09:14 2011 @@ -20,6 +20,7 @@ #include <dirent.h> #include <errno.h> +#include <stddef.h> #if HAVE_OPENDIR @@ -28,7 +29,6 @@ #else -# include <stddef.h> # include <stdlib.h> # include "dirent-private.h" @@ -36,6 +36,10 @@ #endif +#if REPLACE_FCHDIR +# include <unistd.h> +#endif + DIR * opendir (const char *dir_name) { --- modules/opendir.orig Wed Sep 21 23:10:13 2011 +++ modules/opendir Wed Sep 21 23:09:53 2011 @@ -10,6 +10,7 @@ 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 -- In memoriam Orlando Letelier <http://en.wikipedia.org/wiki/Orlando_Letelier>
