mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-09 22:25:30 +00:00
glib-compat: Use g_new0(GMutex, 1) if GLib >= 2.31
Since 2.31, g_mutex_new() is deprecated. Based on commit 2dc7476d32a9e158e688486e8f184c719c53bb4c from libvirt-glib. Original author: Daniel P. Berrange <berrange@redhat.com> Related to: rhbz#1243228
This commit is contained in:
parent
d71efee014
commit
a7050b7d2c
@ -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
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include <libvirt/libvirt.h>
|
||||
|
||||
#include "virt-viewer-events.h"
|
||||
#include "virt-glib-compat.h"
|
||||
|
||||
static GMutex *eventlock = NULL;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user