From bacaf7f18c2f4d3b5cb6bd6145dfb79fa4096759 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 17 Mar 2015 09:45:09 +0000 Subject: [PATCH] sna: Use struct pixman_f_vector for compatibility with older pixman Or else face compile failures: blt.c: In function 'affine_blt': blt.c:1403:3: error: unknown type name 'pixman_f_vector_t' blt.c:1407:4: error: request for member 'v' in something not a structure or union blt.c:1408:4: error: request for member 'v' in something not a structure or union blt.c:1409:4: error: request for member 'v' in something not a structure or union blt.c:1411:3: warning: passing argument 2 of 'pixman_f_transform_point_3d' from incompatible pointer type [enabled by default] In file included from /usr/include/xorg/miscstruct.h:52:0, from /usr/include/xorg/regionstr.h:52, from /usr/include/xorg/region.h:50, from /usr/include/xorg/window.h:51, from /usr/include/xorg/input.h:55, from /usr/include/xorg/xf86str.h:38, from sna.h:43, from blt.c:32: /usr/include/pixman-1/pixman.h:247:15: note: expected 'struct pixman_f_vector *' but argument is of type 'int *' blt.c:1413:7: error: request for member 'v' in something not a structure or union blt.c:1415:7: error: request for member 'v' in something not a structure or union Signed-off-by: Chris Wilson --- configure.ac | 2 ++ src/sna/blt.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 28a47493..9aadc73e 100644 --- a/configure.ac +++ b/configure.ac @@ -447,6 +447,7 @@ fi PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES]) ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server` XSERVER_VERSION=`$PKG_CONFIG --modversion xorg-server` +PIXMAN_VERSION=`$PKG_CONFIG --modversion pixman-1` if test "x$ONLY_UMS" = "xyes"; then UMS="yes" @@ -914,6 +915,7 @@ fi echo "" echo "AC_PACKAGE_STRING will be compiled with:" echo " Xorg Video ABI version: $ABI_VERSION (xorg-server-$XSERVER_VERSION)" +echo " pixman version: pixman-1-$PIXMAN_VERSION" echo " Acceleration backends:$accel_msg" echo " Additional debugging support?$debug_msg" echo " Support for Kernel Mode Setting? $KMS" diff --git a/src/sna/blt.c b/src/sna/blt.c index c534f754..9df7b2bc 100644 --- a/src/sna/blt.c +++ b/src/sna/blt.c @@ -30,6 +30,7 @@ #endif #include "sna.h" +#include #if __x86_64__ #define USE_SSE2 1 @@ -1400,7 +1401,7 @@ affine_blt(const void *src, void *dst, int bpp, for (j = 0; j < dst_height; j++) { pixman_fixed_t x, y; - pixman_f_vector_t v; + struct pixman_f_vector v; uint32_t *b; /* reference point is the center of the pixel */