2003-06-19 Earnie Boyd <earnie@uses.sf.net> * dir.c (read_dirstream): Provide a workaround for broken versions of the MinGW dirent structure. Index: dir.c =================================================================== RCS file: /cvsroot/make/make/dir.c,v retrieving revision 1.51 diff -u -3 -p -r1.51 dir.c --- dir.c 2 May 2003 01:44:59 -0000 1.51 +++ dir.c 19 Jun 2003 19:50:00 -0000 @@ -1128,6 +1128,12 @@ read_dirstream (__ptr_t stream) buf = xmalloc (bufsz); } d = (struct dirent *) buf; +#ifdef __MINGW32__ +#if __MINGW32_VERSION_MAJOR < 3 || (__MINGW32_VERSION_MAJOR == 3 && \ + __MINGW32_VERSION_MINOR == 0) + d->d_name = xmalloc(len); +#endif +#endif FAKE_DIR_ENTRY (d); #ifdef _DIRENT_HAVE_D_NAMLEN d->d_namlen = len - 1;