From fd77c154afb039b6b19f8e29c28dce652b2d060e Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Tue, 30 Aug 2005 23:03:42 +0000 Subject: [PATCH] Fix compilation error exposed with gcc 2.95. --- src/fccache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fccache.c b/src/fccache.c index 51a49af..77f09c7 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include "fcint.h" #define ENDIAN_TEST 0x12345678 @@ -649,6 +651,7 @@ FcDirCacheConsume (int fd, FcFontSet *set) { FcCache metadata; void * current_dir_block; + off_t pos; read(fd, &metadata, sizeof(FcCache)); if (metadata.magic != FC_CACHE_MAGIC) @@ -657,7 +660,7 @@ FcDirCacheConsume (int fd, FcFontSet *set) if (!metadata.count) return FcTrue; - off_t pos = FcCacheNextOffset (lseek(fd, 0, SEEK_CUR)); + pos = FcCacheNextOffset (lseek(fd, 0, SEEK_CUR)); current_dir_block = mmap (0, metadata.count, PROT_READ, MAP_SHARED, fd, pos); if (current_dir_block == MAP_FAILED)