public
Last active

Since GLib 2.31 GStaticRecMutex has been deprecated and GRecMutex is used instead. We do not need to initialize GRecMutex since it is static

  • Download Gist
Fix_Build_against_new_glib.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
diff --git a/agent/agent.c b/agent/agent.c
index 298a8ec..2adeb30 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -120,7 +120,7 @@ enum
static guint signals[N_SIGNALS];
-static GStaticRecMutex agent_mutex = G_STATIC_REC_MUTEX_INIT; /* Mutex used for thread-safe lib */
+static GRecMutex agent_mutex; /* Mutex used for thread-safe lib */
static gboolean priv_attach_stream_component (NiceAgent *agent,
Stream *stream,
@@ -132,12 +132,12 @@ static void priv_free_upnp (NiceAgent *agent);
void agent_lock (void)
{
- g_static_rec_mutex_lock (&agent_mutex);
+ g_rec_mutex_lock (&agent_mutex);
}
void agent_unlock (void)
{
- g_static_rec_mutex_unlock (&agent_mutex);
+ g_rec_mutex_unlock (&agent_mutex);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.