aboutsummaryrefslogtreecommitdiffstats
path: root/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/connect.c b/connect.c
index 66f1ca3..293af66 100644
--- a/connect.c
+++ b/connect.c
@@ -14,6 +14,8 @@ static int connect_domain_event(virConnectPtr c, virDomainPtr d,
return 0;
}
+#if LIBVIR_VERSION_NUMBER >= 10000 /* 0.10.0 */
+
static void connect_close(virConnectPtr c, int reason, void *opaque)
{
struct vconsole_connect *conn = opaque;
@@ -52,6 +54,8 @@ static void connect_close(virConnectPtr c, int reason, void *opaque)
g_free(conn);
}
+#endif
+
static void connect_list(struct vconsole_connect *conn)
{
int i, n;
@@ -94,8 +98,10 @@ struct vconsole_connect *connect_init(struct vconsole_window *win,
conn->win = win;
virConnectDomainEventRegister(conn->ptr, connect_domain_event,
conn, NULL);
+#if LIBVIR_VERSION_NUMBER >= 10000 /* 0.10.0 */
virConnectRegisterCloseCallback(conn->ptr, connect_close,
conn, NULL);
+#endif
gtk_tree_store_append(win->store, &iter, NULL);
gtk_tree_store_set(win->store, &iter,