]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: fix build without numactl
authorEric Blake <eblake@redhat.com>
Mon, 21 Jul 2014 17:24:21 +0000 (11:24 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 21 Jul 2014 18:50:00 +0000 (12:50 -0600)
Under ./configure --without-numactl but with numactl-devel installed,
the build fails with:

../../src/util/virnuma.c: In function 'virNumaNodeIsAvailable':
../../src/util/virnuma.c:407:5: error: implicit declaration of function 'numa_bitmask_isbitset' [-Werror=implicit-function-declaration]
     return numa_bitmask_isbitset(numa_nodes_ptr, node);
     ^

and other failures, all because the configure results for particular
functions were used without regard to whether libnuma was even being
linked in.

* src/util/virnuma.c (virNumaGetPages): Fix message typo.
(virNumaNodeIsAvailable): Correct build when not using numactl.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/util/virnuma.c

index 46f48d2e0f3d00c77ed86c4c1dada92097ba9b67..7a11a3b2193ef4e0fdfec363395f5ddd9664e2c1 100644 (file)
@@ -390,7 +390,7 @@ virNumaGetMaxCPUs(void)
 }
 
 
-#ifdef HAVE_NUMA_BITMASK_ISBITSET
+#if WITH_NUMACTL && HAVE_NUMA_BITMASK_ISBITSET
 /**
  * virNumaNodeIsAvailable:
  * @node: node to check
@@ -485,7 +485,7 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED,
 {
     *distances = NULL;
     *ndistances = 0;
-    VIR_DEBUG("NUMA distance information isn't availble on this host");
+    VIR_DEBUG("NUMA distance information isn't available on this host");
     return 0;
 }
 #endif