From 7c47c52a4f9b2b07ae2dd705ea66b5e61971b8f5 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Wed, 10 Feb 2010 12:19:29 +0100 Subject: [PATCH] Fix compilation without HAVE_MMAP --- util/cairo-script/cairo-script-operators.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c index 91188d9..29b5094 100644 --- a/util/cairo-script/cairo-script-operators.c +++ b/util/cairo-script/cairo-script-operators.c @@ -1751,8 +1751,10 @@ _ft_create_for_source (csi_t *ctx, FT_Error err; cairo_font_face_t *font_face; csi_status_t status; +#ifdef HAVE_MMAP struct mmap_vec vec[2]; int vec_count; +#endif void *bytes; int len; @@ -1779,8 +1781,10 @@ _ft_create_for_source (csi_t *ctx, data->bytes = NULL; data->source = source; +#ifdef HAVE_MMAP vec[0].bytes = tmpl.bytes; vec[0].num_bytes = tmpl.len; +#endif if (source->deflate) { len = source->deflate; @@ -1788,14 +1792,18 @@ _ft_create_for_source (csi_t *ctx, if (_csi_unlikely (bytes == NULL)) return _csi_error (CSI_STATUS_NO_MEMORY); +#ifdef HAVE_MMAP vec[1].bytes = bytes; vec[1].num_bytes = len; - data->bytes = bytes; vec_count = 2; +#endif + data->bytes = bytes; } else { bytes = tmpl.bytes; len = tmpl.len; +#ifdef HAVE_MMAP vec_count = 1; +#endif } data->face = NULL; @@ -1864,7 +1872,9 @@ _ft_create_for_pattern (csi_t *ctx, cairo_font_face_t *font_face; FcPattern *pattern, *resolved; csi_status_t status; +#ifdef HAVE_MMAP struct mmap_vec vec; +#endif void *bytes; _csi_blob_init (&tmpl, (uint8_t *) string->string, string->len); -- 1.6.3.3