diff mbox series

[v1,1/1] selftest mm/mseal: fix arm build

Message ID 20240502225331.3806279-2-jeffxu@chromium.org (mailing list archive)
State New
Headers show
Series selftest/mseal fix arm build | expand

Commit Message

Jeff Xu May 2, 2024, 10:53 p.m. UTC
From: Jeff Xu <jeffxu@chromium.org>

add include linux/mman.h to fix arm build
fix a typo

Signed-off-by: Jeff Xu <jeffxu@chromium.org>
Suggested-by: Ryan Roberts <ryan.roberts@arm.com>
---
 tools/testing/selftests/mm/mseal_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ryan Roberts May 3, 2024, 11 a.m. UTC | #1
On 02/05/2024 23:53, jeffxu@chromium.org wrote:
> From: Jeff Xu <jeffxu@chromium.org>
> 
> add include linux/mman.h to fix arm build
> fix a typo
> 
> Signed-off-by: Jeff Xu <jeffxu@chromium.org>
> Suggested-by: Ryan Roberts <ryan.roberts@arm.com>

I confirm this has fixed our issue. Thanks!

Tested-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>

> ---
>  tools/testing/selftests/mm/mseal_test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
> index ca8dbee0c612..41998cf1dcf5 100644
> --- a/tools/testing/selftests/mm/mseal_test.c
> +++ b/tools/testing/selftests/mm/mseal_test.c
> @@ -1,5 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0
>  #define _GNU_SOURCE
> +#include <linux/mman.h>
>  #include <sys/mman.h>
>  #include <stdint.h>
>  #include <unistd.h>
> @@ -29,7 +30,7 @@
>  # define PKEY_DISABLE_WRITE     0x2
>  #endif
>  
> -#ifndef PKEY_BITS_PER_KEY
> +#ifndef PKEY_BITS_PER_PKEY
>  #define PKEY_BITS_PER_PKEY      2
>  #endif
>
diff mbox series

Patch

diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c
index ca8dbee0c612..41998cf1dcf5 100644
--- a/tools/testing/selftests/mm/mseal_test.c
+++ b/tools/testing/selftests/mm/mseal_test.c
@@ -1,5 +1,6 @@ 
 // SPDX-License-Identifier: GPL-2.0
 #define _GNU_SOURCE
+#include <linux/mman.h>
 #include <sys/mman.h>
 #include <stdint.h>
 #include <unistd.h>
@@ -29,7 +30,7 @@ 
 # define PKEY_DISABLE_WRITE     0x2
 #endif
 
-#ifndef PKEY_BITS_PER_KEY
+#ifndef PKEY_BITS_PER_PKEY
 #define PKEY_BITS_PER_PKEY      2
 #endif