commands.c in memory_hotplug uses nodemask_isset and nodemask_set
functions which are already declared in /usr/include/numa.h with NUMA
v1, thus would cause compile error on the system installed NUMA v1 libs
(e.g. RHEL 5). This patch fixes this issue.
Signed-off-by: Caspar Zhang <[email protected]>
---
testcases/kernel/hotplug/memory_hotplug/commands.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/hotplug/memory_hotplug/commands.c b/testcases/kernel/hotplug/memory_hotplug/commands.c
index 683ac92..4f8ab96 100644
--- a/testcases/kernel/hotplug/memory_hotplug/commands.c
+++ b/testcases/kernel/hotplug/memory_hotplug/commands.c
@@ -59,6 +59,7 @@
#define MPOL_MF_WAIT (1<<2) /* Wait for existing pages to migrate */
#endif
+#if defined(LIBNUMA_API_VERSION) && LIBNUMA_API_VERSION == 2
static inline int nodemask_isset(nodemask_t *mask, int node)
{
if ((unsigned)node >= NUMA_NUM_NODES)
@@ -74,6 +75,7 @@ static inline void nodemask_set(nodemask_t *mask, int node)
mask->n[node / (8*sizeof(unsigned long))] |=
(1UL<<(node%(8*sizeof(unsigned long))));
}
+#endif
static char *whitespace = " \t";
@@ -1336,4 +1338,4 @@ process_commands()
} while (1);
}
-#endif
\ No newline at end of file
+#endif
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been
demonstrated beyond question. Learn why your peers are replacing JEE
containers with lightweight application servers - and what you can gain
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list