diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-07-18 17:21:09 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-07-27 13:43:23 +0000 |
commit | 03aa12c75e117acb0d160212536f6f832e0dc8d9 (patch) | |
tree | c4dfb1113b662b8d0dbe6cd3840b08976c9334c5 /src | |
parent | 9bc88933b23d413885c121d5cf4c78fdeed1edfc (diff) | |
download | fontconfig-03aa12c75e117acb0d160212536f6f832e0dc8d9.tar.gz |
Guard dirent.h includes
Might not be available on Windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/fccache.c | 2 | ||||
-rw-r--r-- | src/fccfg.c | 2 | ||||
-rw-r--r-- | src/fcdir.c | 3 | ||||
-rw-r--r-- | src/fcstat.c | 2 | ||||
-rw-r--r-- | src/fcxml.c | 3 |
5 files changed, 12 insertions, 0 deletions
diff --git a/src/fccache.c b/src/fccache.c index c3e6364..d10f249 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -25,7 +25,9 @@ #include <stdio.h> #include <stdlib.h> #include <fcntl.h> +#ifdef HAVE_DIRENT_H #include <dirent.h> +#endif #include <string.h> #include <limits.h> #include <sys/types.h> diff --git a/src/fccfg.c b/src/fccfg.c index f49657a..74e8746 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -25,7 +25,9 @@ /* Objects MT-safe for readonly access. */ #include "fcint.h" +#ifdef HAVE_DIRENT_H #include <dirent.h> +#endif #include <sys/types.h> #if defined (_WIN32) && !defined (R_OK) diff --git a/src/fcdir.c b/src/fcdir.c index 693c845..0f60f87 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -23,7 +23,10 @@ */ #include "fcint.h" + +#ifdef HAVE_DIRENT_H #include <dirent.h> +#endif FcBool FcFileIsDir (const FcChar8 *file) diff --git a/src/fcstat.c b/src/fcstat.c index 5aa1643..5a2bd7c 100644 --- a/src/fcstat.c +++ b/src/fcstat.c @@ -22,7 +22,9 @@ */ #include "fcint.h" #include "fcarch.h" +#ifdef HAVE_DIRENT_H #include <dirent.h> +#endif #include <limits.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/src/fcxml.c b/src/fcxml.c index a366644..c21090a 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -26,7 +26,10 @@ #include "fcint.h" #include <fcntl.h> #include <stdarg.h> + +#ifdef HAVE_DIRENT_H #include <dirent.h> +#endif #ifdef ENABLE_LIBXML2 |