Fix the compile error when MADV_MERGEABLE is not supported, for example on RHEL5.
Signed-off-by: Wanlong Gao <[email protected]> --- testcases/kernel/mem/thp/thp03.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testcases/kernel/mem/thp/thp03.c b/testcases/kernel/mem/thp/thp03.c index 93a0689..fecc32a 100644 --- a/testcases/kernel/mem/thp/thp03.c +++ b/testcases/kernel/mem/thp/thp03.c @@ -52,6 +52,8 @@ char *TCID = "thp03"; int TST_TOTAL = 1; +#ifdef MADV_MERGEABLE + static void thp_test(void); static long hugepage_size; @@ -119,3 +121,11 @@ void cleanup(void) { TEST_CLEANUP; } + +#else +int main(void) +{ + tst_brkm(TCONF, NULL, "Kernel doesn't support MADV_MERGEABLE" + " or you need to update your glibc-headers"); +} +#endif -- 1.8.0 ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
