blob: 963536f9931ef1ad87293e215b79d9ca0cd5efad [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From f091839532f3afe0a58e8ba0b45615c899a43a47 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 7 Jan 2016 20:12:09 +0000
4Subject: [PATCH 15/32] mincore01: Rename PAGESIZE to pagesize
5
6PAGESIZE conflicts with system headers on musl
7
8Signed-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
13diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c
14index 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--
632.7.0
64