aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-09 22:56:02 +0100
committermarha <marha@users.sourceforge.net>2014-03-09 22:56:02 +0100
commit2112b7dec49833ba872bd3ebcd7288930fec0796 (patch)
tree407c80c9a70f590af2d4c3e5c14678827e189331 /fontconfig/src
parent8badbdef38ce843dc443ddee219eda4040ef2cd5 (diff)
parent3dd4b6420f686b0147d5b8136268cc63196e253b (diff)
downloadvcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.tar.gz
vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.tar.bz2
vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa xserver git update 9 Mar 2014 Conflicts: mesalib/src/mapi/glapi/glapi.h xorg-server/hw/kdrive/ephyr/hostx.c
Diffstat (limited to 'fontconfig/src')
-rw-r--r--fontconfig/src/fcstat.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fontconfig/src/fcstat.c b/fontconfig/src/fcstat.c
index 01371d637..7b054cf78 100644
--- a/fontconfig/src/fcstat.c
+++ b/fontconfig/src/fcstat.c
@@ -186,10 +186,8 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
struct Adler32 ctx;
struct dirent **files;
int n;
-#ifndef HAVE_STRUCT_DIRENT_D_TYPE
int ret = 0;
size_t len = strlen ((const char *)dir);
-#endif
Adler32Init (&ctx);
@@ -210,7 +208,9 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
#ifdef HAVE_STRUCT_DIRENT_D_TYPE
dtype = files[n]->d_type;
-#else
+ if (dtype == DT_UNKNOWN)
+ {
+#endif
struct stat statb;
char f[PATH_MAX + 1];
@@ -227,20 +227,18 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
goto bail;
dtype = statb.st_mode;
+#ifdef HAVE_STRUCT_DIRENT_D_TYPE
+ }
#endif
Adler32Update (&ctx, files[n]->d_name, dlen + 1);
Adler32Update (&ctx, (char *)&dtype, sizeof (int));
-#ifndef HAVE_STRUCT_DIRENT_D_TYPE
bail:
-#endif
free (files[n]);
}
free (files);
-#ifndef HAVE_STRUCT_DIRENT_D_TYPE
if (ret == -1)
return -1;
-#endif
*checksum = Adler32Finish (&ctx);