[virt-viewer v2 05/13] glib-compat: Use g_new0(GMutex, 1) if GLib >= 2.31

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

 



Since 2.31, g_mutex_new() is deprecated.

Based on commit 2dc7476d32a9e158e688486e8f184c719c53bb4c from
libvirt-glib.
Original author: Daniel P. Berrange <berrange@xxxxxxxxxx>

Related to: rhbz#1243228
---
 src/virt-glib-compat.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/virt-glib-compat.h b/src/virt-glib-compat.h
index aa3d7d6..1242289 100644
--- a/src/virt-glib-compat.h
+++ b/src/virt-glib-compat.h
@@ -74,6 +74,10 @@ GByteArray *g_byte_array_new_take (guint8 *data, gsize len);
 #define G_SOURCE_REMOVE     FALSE
 #endif
 
+#if GLIB_CHECK_VERSION(2,31,0)
+#define g_mutex_new() g_new0(GMutex, 1)
+#endif
+
 G_END_DECLS
 
 #endif // _VIRT_GLIB_COMPAT_H
-- 
2.4.4

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux