[PATCH] rdp-compositor: fix compilation against last FreeRDP 2.0

Pekka Paalanen ppaalanen at gmail.com
Fri May 25 14:17:33 UTC 2018


On Thu, 24 May 2018 14:55:20 +0200
David Fort <rdp.effort at gmail.com> wrote:

> The SURFACE_BITS_COMMAND struct has changed and some members have been moved in the
> bmp field.
> ---
>  configure.ac               |  5 ++-
>  libweston/compositor-rdp.c | 69 ++++++++++++++++++++++++--------------
>  2 files changed, 48 insertions(+), 26 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index da3f7342..f4450532 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -264,10 +264,13 @@ if test x$enable_rdp_compositor = xyes; then
>      [],
>      [PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
>    )
> -
>    SAVED_CPPFLAGS="$CPPFLAGS"
>    CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
> +
>    AC_CHECK_HEADERS([freerdp/version.h])
> +  AC_CHECK_MEMBER([SURFACE_BITS_COMMAND.bmp],[have_bmp=1],[have_bmp=0],[[#include <freerdp/update.h>]])
> +  AC_DEFINE([HAVE_SURFACE_BITS_BMP], $have_bmp, [SURFACE_BITS_CMD has bmp field])
> +
>    CPPFLAGS="$SAVED_CPPFLAGS"
>  fi
>  

Hi,

with freerdp-2.0.0_rc1, this results in the following and tons more:

/home/pq/git/weston/libweston/compositor-rdp.c: In function ‘rdp_peer_refresh_rfx’:
/home/pq/git/weston/libweston/compositor-rdp.c:70:29: error: ‘SURFACE_BITS_COMMAND {aka struct _SURFACE_BITS_COMMAND}’ has no member named ‘bmp’; did you mean ‘bpp’?
 #define SURFACE_BPP(cmd) cmd->bmp.bpp
                             ^
/home/pq/git/weston/libweston/compositor-rdp.c:219:2: note: in expansion of macro ‘SURFACE_BPP’
  SURFACE_BPP(cmd) = 32;


However, configure says:

checking for SURFACE_BITS_COMMAND.bmp... no


But config.h contains:

/* SURFACE_BITS_CMD has bmp field */
#define HAVE_SURFACE_BITS_BMP $have_bmp

So, something to fix. :-)


> diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
> index 693f136a..6e70b303 100644
> --- a/libweston/compositor-rdp.c
> +++ b/libweston/compositor-rdp.c
> @@ -66,6 +66,22 @@
>  #define FREERDP_CB_RETURN(V) return TRUE
>  #endif
>  
> +#ifdef HAVE_SURFACE_BITS_BMP
> +#define SURFACE_BPP(cmd) cmd->bmp.bpp
> +#define SURFACE_CODECID(cmd) cmd->bmp.codecID
> +#define SURFACE_WIDTH(cmd) cmd->bmp.width
> +#define SURFACE_HEIGHT(cmd) cmd->bmp.height
> +#define SURFACE_BITMAP_DATA(cmd) cmd->bmp.bitmapData
> +#define SURFACE_BITMAP_DATA_LEN(cmd) cmd->bmp.bitmapDataLength
> +#else
> +#define SURFACE_BPP(cmd) cmd->bpp
> +#define SURFACE_CODECID(cmd) cmd->codecID
> +#define SURFACE_WIDTH(cmd) cmd->width
> +#define SURFACE_HEIGHT(cmd) cmd->height
> +#define SURFACE_BITMAP_DATA(cmd) cmd->bitmapData
> +#define SURFACE_BITMAP_DATA_LEN(cmd) cmd->bitmapDataLength
> +#endif

Phuyuck, but I guess it cannot be helped. Shouldn't 'cmd' in the
expansion be in parentheses?


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180525/11a22e74/attachment.sig>


More information about the wayland-devel mailing list