[PATCH] Fix compilation with FreeRdp 1.1 and master

Hardening rdp.effort at gmail.com
Mon Dec 9 13:16:39 PST 2013


The API to use remoteFx encoding has changed between master and stable 1.1
branch. This patch fixes compilation for both.
Please note that the freerdp/version.h file is generated in the very last versions
of FreeRdp so be sure to update/install the last versions.
---
 src/compositor-rdp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 8a302f8..5a2da45 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -27,6 +27,7 @@
 #include <errno.h>
 #include <linux/input.h>
 
+#include <freerdp/version.h>
 #include <freerdp/freerdp.h>
 #include <freerdp/listener.h>
 #include <freerdp/update.h>
@@ -574,7 +575,11 @@ rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
 	context->item.peer = client;
 	context->item.flags = RDP_PEER_OUTPUT_ENABLED;
 
+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR == 1
 	context->rfx_context = rfx_context_new();
+#else
+	context->rfx_context = rfx_context_new(0);
+#endif
 	context->rfx_context->mode = RLGR3;
 	context->rfx_context->width = client->settings->DesktopWidth;
 	context->rfx_context->height = client->settings->DesktopHeight;
-- 
1.8.1.2



More information about the wayland-devel mailing list