/[packages]/updates/8/kernel/current/SOURCES/kselftest-vm-fix-tests-build-with-old-libc.patch
ViewVC logotype

Contents of /updates/8/kernel/current/SOURCES/kselftest-vm-fix-tests-build-with-old-libc.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1795002 - (show annotations) (download)
Wed Mar 16 20:40:50 2022 UTC (2 years, 1 month ago) by tmb
File size: 1602 byte(s)
add current -stable queue
1 From 02c435a25383682b73aa475781e460910a97e063 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Fri, 4 Mar 2022 20:29:04 -0800
4 Subject: kselftest/vm: fix tests build with old libc
5
6 From: Chengming Zhou <zhouchengming@bytedance.com>
7
8 [ Upstream commit b773827e361952b3f53ac6fa4c4e39ccd632102e ]
9
10 The error message when I build vm tests on debian10 (GLIBC 2.28):
11
12 userfaultfd.c: In function `userfaultfd_pagemap_test':
13 userfaultfd.c:1393:37: error: `MADV_PAGEOUT' undeclared (first use
14 in this function); did you mean `MADV_RANDOM'?
15 if (madvise(area_dst, test_pgsize, MADV_PAGEOUT))
16 ^~~~~~~~~~~~
17 MADV_RANDOM
18
19 This patch includes these newer definitions from UAPI linux/mman.h, is
20 useful to fix tests build on systems without these definitions in glibc
21 sys/mman.h.
22
23 Link: https://lkml.kernel.org/r/20220227055330.43087-2-zhouchengming@bytedance.com
24 Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
25 Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
26 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
27 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28 Signed-off-by: Sasha Levin <sashal@kernel.org>
29 ---
30 tools/testing/selftests/vm/userfaultfd.c | 1 +
31 1 file changed, 1 insertion(+)
32
33 --- a/tools/testing/selftests/vm/userfaultfd.c
34 +++ b/tools/testing/selftests/vm/userfaultfd.c
35 @@ -46,6 +46,7 @@
36 #include <signal.h>
37 #include <poll.h>
38 #include <string.h>
39 +#include <linux/mman.h>
40 #include <sys/mman.h>
41 #include <sys/syscall.h>
42 #include <sys/ioctl.h>

  ViewVC Help
Powered by ViewVC 1.1.30