summaryrefslogtreecommitdiff
path: root/pango/pangofc-font.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-31 11:54:43 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-31 12:07:38 +0100
commit0b86506c7c19e3ef0c6581dfbc04aec769af57c3 (patch)
treee3a4009c4b5fceedc55ed45b5e33578661272285 /pango/pangofc-font.h
parentc6d6cfff40ba2e80c2fda7d33d2942a0b4a2d14a (diff)
downloadpango-0b86506c7c19e3ef0c6581dfbc04aec769af57c3.tar.gz
Ignore undefined macros when importing freetype
Recently, freetype added checks for various options and forgot to check all combinations. This breaks building projects including freetype.h and using -Werror=undef.
Diffstat (limited to 'pango/pangofc-font.h')
-rw-r--r--pango/pangofc-font.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h
index ab5a12ac..954abdcb 100644
--- a/pango/pangofc-font.h
+++ b/pango/pangofc-font.h
@@ -23,10 +23,21 @@
#define __PANGO_FC_FONT_H__
#include <pango/pango.h>
+
+/* Freetype has undefined macros in its header */
+#ifdef PANGO_COMPILATION
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wundef"
+#endif
+
#include <ft2build.h>
#include FT_FREETYPE_H
#include <fontconfig/fontconfig.h>
+#ifdef PANGO_COMPILATION
+#pragma GCC diagnostic pop
+#endif
+
G_BEGIN_DECLS
#define PANGO_TYPE_FC_FONT (pango_fc_font_get_type ())