]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch
ghostscript: Addition of patch to fix freetype problem
[people/pmueller/ipfire-2.x.git] / src / patches / ghostscript-drop-use-of-FT_CALLBACK_DEF-with-Freetype-2.10.3-and-later.patch
1 From 41ef9a0bc36b9db7115fbe9623f989bfb47bbade Mon Sep 17 00:00:00 2001
2 From: Chris Liddell <chris.liddell@artifex.com>
3 Date: Tue, 20 Oct 2020 09:49:45 +0100
4 Subject: [PATCH] Bug 702985: drop use of FT_CALLBACK_DEF() def
5
6 From 2.10.3, Freetype disappeared the FT_CALLBACK_DEF() macro, which is what
7 we used when defining our callbacks from Freetype.
8
9 No guidance forthcoming from the Freetype developer who made those changes,
10 so change to explicitly declaring the callbacks file static.
11
12 Should fix the reported build failures.
13 ---
14 base/fapi_ft.c | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17 diff --git a/base/fapi_ft.c b/base/fapi_ft.c
18 index 65fa6dcf4..21aef2f06 100644
19 --- a/base/fapi_ft.c
20 +++ b/base/fapi_ft.c
21 @@ -125,7 +125,7 @@ static void
22 delete_inc_int_info(gs_fapi_server * a_server,
23 FT_IncrementalRec * a_inc_int_info);
24
25 -FT_CALLBACK_DEF(void *)
26 +static void *
27 FF_alloc(FT_Memory memory, long size)
28 {
29 gs_memory_t *mem = (gs_memory_t *) memory->user;
30 @@ -133,7 +133,7 @@ FF_alloc(FT_Memory memory, long size)
31 return (gs_malloc(mem, size, 1, "FF_alloc"));
32 }
33
34 -FT_CALLBACK_DEF(void *)
35 +static void *
36 FF_realloc(FT_Memory memory, long cur_size, long new_size, void *block)
37 {
38 gs_memory_t *mem = (gs_memory_t *) memory->user;
39 @@ -153,7 +153,7 @@ FT_CALLBACK_DEF(void *)
40 return (tmp);
41 }
42
43 -FT_CALLBACK_DEF(void)
44 +static void
45 FF_free(FT_Memory memory, void *block)
46 {
47 gs_memory_t *mem = (gs_memory_t *) memory->user;
48 --
49 2.17.1
50