Recent changes caused _cairo_xlib_surface_acquire_pattern_surface<br>to depend on gradient-related definitions in libXrender's<br>headers. Unfortunately, those definitions are of recent vintage,<br>so this breaks compiling on distributions with older libXrender<br>
versions. This patch ensures that, if those definitions are<br>absent, the code that uses them isn't compiled; instead, a<br>fallback is used.<br>---<br> src/cairo-xlib-surface.c | 5 +++++<br> 1 files changed, 5 insertions(+), 0 deletions(-)<br>
<br>diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c<br>index 150e6e0..2e63e47 100644<br>--- a/src/cairo-xlib-surface.c<br>+++ b/src/cairo-xlib-surface.c<br>@@ -1910,6 +1910,10 @@ _cairo_xlib_surface_acquire_pattern_surface (cairo_xlib_surface_t *dst,<br>
Picture picture;<br> unsigned int i;<br> <br>+#if RENDER_MAJOR == 0 && RENDER_MINOR < 10<br>+ /* gradient definitions not present in Xrender headers */<br>+ break;<br>+#else<br> if (dst->buggy_gradients)<br>
break;<br> <br>@@ -2048,6 +2052,7 @@ _cairo_xlib_surface_acquire_pattern_surface (cairo_xlib_surface_t *dst,<br> <br> *surface_out = surface;<br> return CAIRO_STATUS_SUCCESS;<br>+#endif /* #if RENDER_MAJOR/MINOR imply support for gradients */<br>
}<br> default:<br> ASSERT_NOT_REACHED;<br>-- <br>1.6.0.4<br><br>