1) include config.h
authorewt <devnull@localhost>
Thu, 20 Feb 1997 02:21:23 +0000 (02:21 +0000)
committerewt <devnull@localhost>
Thu, 20 Feb 1997 02:21:23 +0000 (02:21 +0000)
2) pay attention to HAVE_DIRENT_H

CVS patchset: 1449
CVS date: 1997/02/20 02:21:23

misc/glob.c

index ea2dda4..d8b4d54 100644 (file)
@@ -35,6 +35,7 @@ Cambridge, MA 02139, USA.  */
 #include <errno.h>
 #include <sys/types.h>
 
+#include "config.h"
 
 /* Comment out all this code if we are using the GNU C Library, and are not
    actually compiling the library itself.  This code is part of the GNU C
@@ -68,7 +69,7 @@ extern int errno;
 #define        NULL    0
 #endif
 
-#if    defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__)
+#if    defined (POSIX) || defined (DIRENT) || defined (__GNU_LIBRARY__)  || defined(HAVE_DIRENT_H)
 #include <dirent.h>
 #ifndef        __GNU_LIBRARY__
 #define D_NAMLEN(d) strlen((d)->d_name)