diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-04 16:07:35 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-04 16:07:35 +0200 |
commit | 49d1cff8391eecfea5c2b5760fefa9cc40cbd711 (patch) | |
tree | 32b8a47c34c2d8ccb9acb347b512ab418b66470e | |
parent | 5fe4857c368a81f7e48259b6b08c20e9bc58bf64 (diff) | |
download | vconsole-49d1cff8391eecfea5c2b5760fefa9cc40cbd711.tar.gz |
fix build with older libvirt versions
-rw-r--r-- | connect.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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, |