diff --git a/configure.ac b/configure.ac index 1da028a2..96815b89 100644 --- a/configure.ac +++ b/configure.ac @@ -491,10 +491,10 @@ fi # Support for "PubSub" event system if test "x${have_freerdp}" = "xyes" then - AC_CHECK_MEMBERS([rdpContext.pubSub], - [AC_DEFINE([HAVE_FREERDP_PUBSUB],, - [Whether this version of FreeRDP provides the PubSub event system])],, - [[#include ]]) + AC_CHECK_DECL([PubSub_SubscribeChannelConnected], + [AC_DEFINE([HAVE_FREERDP_EVENT_PUBSUB],, + [Whether this version of FreeRDP provides the PubSub event system])],, + [#include ]) fi # Addin registration variations diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index c023d8ea..9aaa0c7b 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -57,6 +57,14 @@ #include "compat/client-cliprdr.h" #endif +#ifdef HAVE_FREERDP_CLIENT_DISP_H +#include +#endif + +#ifdef HAVE_FREERDP_EVENT_PUBSUB +#include +#endif + #ifdef ENABLE_WINPR #include #else @@ -146,7 +154,7 @@ int __guac_receive_channel_data(freerdp* rdp_inst, int channelId, UINT8* data, i return freerdp_channels_data(rdp_inst, channelId, data, size, flags, total_size); } -#ifdef HAVE_FREERDP_PUBSUB +#ifdef HAVE_FREERDP_EVENT_PUBSUB /** * Called whenever a channel connects. */ @@ -204,7 +212,7 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) { guac_client_log(client, GUAC_LOG_WARNING, "Failed to load drdynvc plugin."); -#ifdef HAVE_FREERDP_PUBSUB +#ifdef HAVE_FREERDP_EVENT_PUBSUB /* Subscribe to and handle channel connected events */ PubSub_SubscribeChannelConnected(context->pubSub, (pChannelConnectedEventHandler) guac_rdp_channel_connected);