From c7823054d431d2e7a0ff064b8c40d51b97156220 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 10 Dec 2022 17:30:35 +0100 Subject: [PATCH] x11-toolkits/pangox-compat: fix build with clang 15 During an exp-run for llvm 15 (see bug 265425), it turned out that x11-toolkits/pangox-compat failed to build with clang 15: pangox.c:983:15: error: incompatible integer to pointer conversion assigning to 'PangoFontMetrics *' (aka 'struct _PangoFontMetrics *') from 'int' [-Wint-conversion] metrics = pango_font_metrics_new (); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ pangox-fontmap.c:944:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion] char *files_str = pango_config_key_get ("PangoX/AliasFiles"); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is because pangox-compat uses two private functions from the main pango library, which are not declared in the public pango headers. Fix the errors by adding the two private functions in pango-impl-utils.h, copying the declarations from pango-font-private.h and pango-utils-private.h. PR: 268301 Approved by: fluffy (maintainer) MFH: 2022Q4 --- .../pangox-compat/files/patch-pango-impl-utils.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 x11-toolkits/pangox-compat/files/patch-pango-impl-utils.h diff --git a/x11-toolkits/pangox-compat/files/patch-pango-impl-utils.h b/x11-toolkits/pangox-compat/files/patch-pango-impl-utils.h new file mode 100644 index 000000000000..3323d9064c89 --- /dev/null +++ b/x11-toolkits/pangox-compat/files/patch-pango-impl-utils.h @@ -0,0 +1,14 @@ +--- pango-impl-utils.h.orig 2012-08-27 23:19:32 UTC ++++ pango-impl-utils.h +@@ -174,6 +174,11 @@ pango_glyph_string_reverse_range (PangoGlyphString *gl + } + } + ++/* From pango-font-private.h */ ++PangoFontMetrics *pango_font_metrics_new (void); ++ ++/* From pango-utils-private.h */ ++char *pango_config_key_get (const char *key); + + G_END_DECLS +