Skip to contentSkip to conversation

selftests/mm: define MADV_PAGEOUT to fix compilation issues

PATCH Applied David Hildenbrand 1 participant 1 message Jan 9, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 69c66add5663 ("selftests/vm: anon_cow: test COW handling of anonymous memory")
Cc Andrew Morton <[email protected]>
Cc Shuah Khan <[email protected]>
---
 tools/testing/selftests/mm/cow.c | 3 +++
 1 file changed, 3 insertions(+)
tools/testing/selftests/mm/cow.c +3 -0
index 16216d893d96..0eb2e8180aa5 100644
@@ -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
Signature · 1 line
2.39.0