commands.c still fail to compile under RHEL5 since it used a compat
function from NUMA API v2.
Signed-off-by: Caspar Zhang <[email protected]>
---
testcases/kernel/hotplug/memory_hotplug/commands.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index 4f8ab96..5216339 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -394,7 +394,11 @@ get_arg_nodeid_list(char *args, unsigned int *list)
int node, count = 0;
gcp = &glctx;
- my_allowed_nodes = numa_get_membind_compat();
+#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
+ my_allowed_nodes = numa_get_membind_compat();
+#else
+ my_allowed_nodes = numa_get_membind();
+#endif
while (*args != '\0') {
if (!isdigit(*args)) {
fprintf(stderr, "%s: expected digit for <node/list>\n",
@@ -452,7 +456,11 @@ get_current_nodeid_list(unsigned int *fromids)
int node;
gcp = &glctx;
- my_allowed_nodes = numa_get_membind_compat();
+#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
+ my_allowed_nodes = numa_get_membind_compat();
+#else
+ my_allowed_nodes = numa_get_membind();
+#endif
for (node=0; node <= max_node; ++node) {
if (nodemask_isset(&my_allowed_nodes, node))
*(fromids + nr_nodes++) = node;
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list