diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-30 09:49:23 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-12-30 09:49:23 -0700 |
commit | 60ccbcf9cca65edac59bf374cc4af13eda91c791 (patch) | |
tree | 5c51d07656d0120d08d0effcc310bb58ed4c6997 /libs/pbd/crossthread.cc | |
parent | 2f167e6163bdf599fd66fd642ab7159405ef8f81 (diff) |
use a local version (copy) of the G_SOURCE_FUNC macro, since it is not available in the GTK+ version we use for the official build stack
Diffstat (limited to 'libs/pbd/crossthread.cc')
-rw-r--r-- | libs/pbd/crossthread.cc | 7 |
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()); } |