Re: [PATCH] KVM: selftests: Include linux version of mman.h
From: Ackerley Tng
Date: Tue Apr 28 2026 - 19:56:44 EST
Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx> writes:
> Fix a selftest build error by switching a mman.h header include from the
> "sys" version to the "linux" one.
>
>
> [...snip...]
>
> diff --git a/tools/testing/selftests/kvm/guest_memfd_test.c b/tools/testing/selftests/kvm/guest_memfd_test.c
> index ec7644aae999..7c113b8c4f75 100644
> --- a/tools/testing/selftests/kvm/guest_memfd_test.c
> +++ b/tools/testing/selftests/kvm/guest_memfd_test.c
> @@ -14,7 +14,7 @@
> #include <linux/bitmap.h>
> #include <linux/falloc.h>
> #include <linux/sizes.h>
> -#include <sys/mman.h>
> +#include <linux/mman.h>
Thanks for reporting this! I'll take note for next time. This works fine
with my compiler too.
Tested-by: Ackerley Tng <ackerleytng@xxxxxxxxxx>
> #include <sys/types.h>
> #include <sys/stat.h>
>
> --
> 2.54.0