summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-12-30 09:49:23 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-12-30 09:49:23 -0700
commit60ccbcf9cca65edac59bf374cc4af13eda91c791 (patch)
tree5c51d07656d0120d08d0effcc310bb58ed4c6997
parent2f167e6163bdf599fd66fd642ab7159405ef8f81 (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
-rw-r--r--libs/pbd/crossthread.cc7
-rw-r--r--libs/pbd/test/timer_test.cc4
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc6
3 files changed, 15 insertions, 2 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());
}
diff --git a/libs/pbd/test/timer_test.cc b/libs/pbd/test/timer_test.cc
index 7c78b9c3c0..43001d824e 100644
--- a/libs/pbd/test/timer_test.cc
+++ b/libs/pbd/test/timer_test.cc
@@ -10,6 +10,10 @@
#include <windows.h>
#endif
+#ifndef G_SOURCE_FUNC
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+
CPPUNIT_TEST_SUITE_REGISTRATION (TimerTest);
using namespace std;
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 665f58f02e..c558f27837 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -81,6 +81,10 @@
#include "fader.h"
#include "pot.h"
+#ifndef G_SOURCE_FUNC
+#define G_SOURCE_FUNC(f) ((GSourceFunc) (void (*)(void)) (f))
+#endif
+
using namespace ARDOUR;
using namespace std;
using namespace PBD;
@@ -942,7 +946,7 @@ MackieControlProtocol::create_surfaces ()
ipm->mcp = this;
ipm->port = &input_port;
- g_source_set_callback (surface->input_source, (GSourceFunc) ipmidi_input_handler, ipm, NULL);
+ g_source_set_callback (surface->input_source, G_SOURCE_FUNC (ipmidi_input_handler), ipm, NULL);
g_source_attach (surface->input_source, main_loop()->get_context()->gobj());
}
}