[gtk-vnc] Add compat macro for g_mutex_new|free with glib >= 2.31



commit 9e5ea5baa90f66f5da97948e3743bdbfa2f1e65d
Author: Daniel P. Berrange <berrange redhat com>
Date:   Thu Jun 21 15:41:58 2012 +0100

    Add compat macro for g_mutex_new|free with glib >= 2.31

 src/vncconnection.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/vncconnection.c b/src/vncconnection.c
index 1187486..9f9db5c 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -56,6 +56,11 @@
 
 #include "dh.h"
 
+#if GLIB_CHECK_VERSION(2, 31, 0)
+#define g_mutex_new() g_new0(GMutex, 1)
+#define g_mutex_free(m) g_free(m)
+#endif
+
 struct wait_queue
 {
     gboolean waiting;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]