diff options
author | David Hildenbrand <david@redhat.com> | 2023-01-09 20:12:55 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-01-19 04:12:59 +0300 |
commit | f4d9139f1394cbe2de158ab8771fea4e587004d4 (patch) | |
tree | 24c0f67582fd9e91bb4e8fee5b37573919308633 /tools/testing/selftests/mm | |
parent | c4876ff68716e5372224d17045b47610d667a0ee (diff) | |
download | linux-f4d9139f1394cbe2de158ab8771fea4e587004d4.tar.xz |
selftests/mm: define MADV_PAGEOUT to fix compilation issues
If MADV_PAGEOUT is not defined (e.g., on AlmaLinux 8), compilation will
fail. Let's fix that like khugepaged.c does by conditionally defining
MADV_PAGEOUT.
Link: https://lkml.kernel.org/r/20230109171255.488749-1-david@redhat.com
Fixes: 69c66add5663 ("selftests/vm: anon_cow: test COW handling of anonymous memory")
Signed-off-by: David Hildenbrand <david@redhat.com>
Reported-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/testing/selftests/mm')
-rw-r--r-- | tools/testing/selftests/mm/cow.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index 16216d893d96..0eb2e8180aa5 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -30,6 +30,9 @@ #include "../kselftest.h" #include "vm_util.h" +#ifndef MADV_PAGEOUT +#define MADV_PAGEOUT 21 +#endif #ifndef MADV_COLLAPSE #define MADV_COLLAPSE 25 #endif |