diff options
Diffstat (limited to 'libXfont/src/fontfile/catalogue.c')
-rw-r--r-- | libXfont/src/fontfile/catalogue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libXfont/src/fontfile/catalogue.c b/libXfont/src/fontfile/catalogue.c index 3a04a754d..5ce8a0799 100644 --- a/libXfont/src/fontfile/catalogue.c +++ b/libXfont/src/fontfile/catalogue.c @@ -27,6 +27,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include <X11/Xwindows.h> #include <X11/fonts/fntfilst.h> #include <sys/types.h> #include <sys/stat.h> @@ -140,7 +141,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) int pathlen; path = fpe->name + strlen(CataloguePrefix); - if (stat(path, &statbuf) < 0 || !S_ISDIR(statbuf.st_mode)) + if (stat(path, &statbuf) < 0 || (statbuf.st_mode&_S_IFDIR)) return BadFontPath; if ((forceScan == FALSE) && (statbuf.st_mtime <= cat->mtime)) @@ -154,6 +155,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) } CatalogueUnrefFPEs (fpe); + #ifndef _MSC_VER while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); @@ -218,6 +220,7 @@ CatalogueRescan (FontPathElementPtr fpe, Bool forceScan) continue; } } + #endif closedir(dir); |