diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/virt-glib-compat.h | 4 | ||||
-rw-r--r-- | src/virt-viewer-events.c | 1 |
2 files changed, 5 insertions, 0 deletions
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 diff --git a/src/virt-viewer-events.c b/src/virt-viewer-events.c index 74828f5..02b7216 100644 --- a/src/virt-viewer-events.c +++ b/src/virt-viewer-events.c @@ -33,6 +33,7 @@ #include <libvirt/libvirt.h> #include "virt-viewer-events.h" +#include "virt-glib-compat.h" static GMutex *eventlock = NULL; |