--- libvirt-override.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c index f7c37a2..6964ee4 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -420,12 +420,14 @@ cleanup: */ static int getPyNodeCPUCount(virConnectPtr conn) { - int i_retval; + int i_retval = -1; virNodeInfo nodeinfo; +#if LIBVIR_CHECK_VERSION(1,0,0) LIBVIRT_BEGIN_ALLOW_THREADS; i_retval = virNodeGetCPUMap(conn, NULL, NULL, 0); LIBVIRT_END_ALLOW_THREADS; +#endif /* LIBVIR_CHECK_VERSION(1,0,0) */ if (i_retval < 0) { /* fallback: use nodeinfo */ @@ -7054,6 +7056,7 @@ cleanup: return ret; } +#if LIBVIR_CHECK_VERSION(1,0,0) static PyObject * libvirt_virNodeGetCPUMap(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) @@ -7122,6 +7125,7 @@ error: ret = NULL; goto cleanup; } +#endif /* LIBVIR_CHECK_VERSION(1,0,0) */ static PyObject * -- 1.8.3.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list