diff options
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch b/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch new file mode 100644 index 0000000000..963536f993 --- /dev/null +++ b/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From f091839532f3afe0a58e8ba0b45615c899a43a47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 7 Jan 2016 20:12:09 +0000 | ||
4 | Subject: [PATCH 15/32] mincore01: Rename PAGESIZE to pagesize | ||
5 | |||
6 | PAGESIZE conflicts with system headers on musl | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | testcases/kernel/syscalls/mincore/mincore01.c | 10 +++++----- | ||
11 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
12 | |||
13 | diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c | ||
14 | index 97a3d95..fa426d1 100644 | ||
15 | --- a/testcases/kernel/syscalls/mincore/mincore01.c | ||
16 | +++ b/testcases/kernel/syscalls/mincore/mincore01.c | ||
17 | @@ -45,7 +45,7 @@ | ||
18 | #include "test.h" | ||
19 | #include "safe_macros.h" | ||
20 | |||
21 | -static int PAGESIZE; | ||
22 | +static int pagesize; | ||
23 | static rlim_t STACK_LIMIT = 10485760; | ||
24 | |||
25 | static void cleanup(void); | ||
26 | @@ -146,7 +146,7 @@ static void setup4(struct test_case_t *tc) | ||
27 | } | ||
28 | |||
29 | tc->addr = global_pointer; | ||
30 | - tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + PAGESIZE; | ||
31 | + tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + pagesize; | ||
32 | tc->vector = global_vec; | ||
33 | |||
34 | /* | ||
35 | @@ -161,7 +161,7 @@ static void setup(void) | ||
36 | char *buf; | ||
37 | int fd; | ||
38 | |||
39 | - PAGESIZE = getpagesize(); | ||
40 | + pagesize = getpagesize(); | ||
41 | |||
42 | tst_sig(NOFORK, DEF_HANDLER, cleanup); | ||
43 | |||
44 | @@ -170,7 +170,7 @@ static void setup(void) | ||
45 | TEST_PAUSE; | ||
46 | |||
47 | /* global_pointer will point to a mmapped area of global_len bytes */ | ||
48 | - global_len = PAGESIZE * 2; | ||
49 | + global_len = pagesize * 2; | ||
50 | |||
51 | buf = SAFE_MALLOC(cleanup, global_len); | ||
52 | memset(buf, 42, global_len); | ||
53 | @@ -186,7 +186,7 @@ static void setup(void) | ||
54 | PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | ||
55 | |||
56 | global_vec = SAFE_MALLOC(cleanup, | ||
57 | - (global_len + PAGESIZE - 1) / PAGESIZE); | ||
58 | + (global_len + pagesize - 1) / pagesize); | ||
59 | |||
60 | SAFE_CLOSE(cleanup, fd); | ||
61 | } | ||
62 | -- | ||
63 | 2.7.0 | ||
64 | |||