MADV_COLLAPSE is part of linux/mman.h and needs to be included for this selftest for glibc compatibility. It is also included in other tests that use MADV_COLLAPSE.
Fixes: d9c7ff4dae62 ("selftests: prctl: introduce tests for disabling THPs completely") Reported-by: Mark Brown <broo...@kernel.org> Closes: https://lore.kernel.org/all/c8249725-e91d-4c51-b9bb-40305e61e...@sirena.org.uk/ Signed-off-by: Usama Arif <usamaarif...@gmail.com> --- tools/testing/selftests/mm/prctl_thp_disable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/mm/prctl_thp_disable.c b/tools/testing/selftests/mm/prctl_thp_disable.c index feb711dca3a1d..84b4a4b345af5 100644 --- a/tools/testing/selftests/mm/prctl_thp_disable.c +++ b/tools/testing/selftests/mm/prctl_thp_disable.c @@ -9,6 +9,7 @@ #include <string.h> #include <unistd.h> #include <sys/mman.h> +#include <linux/mman.h> #include <sys/prctl.h> #include <sys/wait.h> -- 2.47.3