summaryrefslogtreecommitdiff
path: root/libs/pbd/crossthread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/pbd/crossthread.cc')
-rw-r--r--libs/pbd/crossthread.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/pbd/crossthread.cc b/libs/pbd/crossthread.cc
index 11d3815b05..9f183651ee 100644
--- a/libs/pbd/crossthread.cc
+++ b/libs/pbd/crossthread.cc
@@ -41,6 +41,10 @@ using namespace Glib;
#include "crossthread.win.cc"
#endif
+#ifndef G_SOURCE_FUNC
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+
gboolean
cross_thread_channel_call_receive_slot (GIOChannel*, GIOCondition condition, void *data)
{
@@ -58,6 +62,7 @@ void
CrossThreadChannel::attach (Glib::RefPtr<Glib::MainContext> context)
{
receive_source = g_io_create_watch (receive_channel, GIOCondition(G_IO_IN|G_IO_PRI|G_IO_ERR|G_IO_HUP|G_IO_NVAL));
- g_source_set_callback (receive_source, (GSourceFunc) cross_thread_channel_call_receive_slot, this, NULL);
+
+ g_source_set_callback (receive_source, G_SOURCE_FUNC(cross_thread_channel_call_receive_slot), this, NULL);
g_source_attach (receive_source, context->gobj());
}