[libvirt] [PATCH] virnuma: Implement virNumaGetDistances stub for non-NUMA

Michal Privoznik mprivozn at redhat.com
Wed Jun 4 09:55:22 UTC 2014


In case the libvirt is built without numactl support, we're
missing the virNumaGetDistances() stub so the linking fails:

  CCLD     libvirt_lxc
libvirt_lxc-nodeinfo.o: In function `virNodeCapsGetSiblingInfo':
/home/zippy/tmp/libvirt.git/src/nodeinfo.c:1763: undefined reference to `virNumaGetDistances'
collect2: error: ld returned 1 exit status
make[3]: *** [libvirt_lxc] Error 1

The issue was introduced in 77c830d8c4.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---

Notes:
    Pushing under build-breaker and trivial rules.

 src/util/virnuma.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index e8ceec8..042844b 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -443,6 +443,17 @@ virNumaGetNodeCPUs(int node ATTRIBUTE_UNUSED,
                    _("NUMA isn't available on this host"));
     return -1;
 }
+
+int
+virNumaGetDistances(int node ATTRIBUTE_UNUSED,
+                    int **distances,
+                    int *ndistances)
+{
+    *distances = NULL;
+    *ndistances = 0;
+    VIR_DEBUG("NUMA isn't available on this host");
+    return 0;
+}
 #endif
 
 
-- 
2.0.0




More information about the libvir-list mailing list