提交 72823b44 编写于 作者: E Eric Blake

build: fix build without numactl

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: NEric Blake <eblake@redhat.com>
上级 53939d58
...@@ -390,7 +390,7 @@ virNumaGetMaxCPUs(void) ...@@ -390,7 +390,7 @@ virNumaGetMaxCPUs(void)
} }
#ifdef HAVE_NUMA_BITMASK_ISBITSET #if WITH_NUMACTL && HAVE_NUMA_BITMASK_ISBITSET
/** /**
* virNumaNodeIsAvailable: * virNumaNodeIsAvailable:
* @node: node to check * @node: node to check
...@@ -485,7 +485,7 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED, ...@@ -485,7 +485,7 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED,
{ {
*distances = NULL; *distances = NULL;
*ndistances = 0; *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; return 0;
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册