Package: pike7.8 / 7.8.866-7

freetype_2.6_typeof.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Subject: FreeType: Fix compilation with Freetype 2.6.
 Freetype 2.6 defines a conflicting TYPEOF() macro.
Author: Henrik Grubbström (Grubba) <grubba@grubba.org>
Origin: upstream, commit 49709fae3241094df4ecde51b52d6abaeb128041

--- a/src/modules/_Image_FreeType/freetype.c
+++ b/src/modules/_Image_FreeType/freetype.c
@@ -6,9 +6,6 @@
 */
 
 #include "config.h"
-#include "global.h"
-#include "module.h"
-#include "pike_error.h"
 
 #ifdef HAVE_LIBFT2
 #ifndef HAVE_FT_FT2BUILD
@@ -22,6 +19,13 @@
 #include FT_TRUETYPE_IDS_H
 #endif
 
+/* Freetype 2.6 defines a conflicting TYPEOF() macro. */
+#undef TYPEOF
+#endif /* HAVE_LIBFT2 */
+
+#include "global.h"
+#include "module.h"
+#include "pike_error.h"
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -35,7 +39,6 @@
 #include "module_support.h"
 #include "operators.h"
 #include "../Image/image.h"
-#endif /* HAVE_LIBFT2 */
 
 
 #ifdef HAVE_LIBFT2