summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThierry Fauck <thierry@linux.vnet.ibm.com>2014-08-08 14:22:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 15:57:25 -0700
commit8b6aaf65d3b001ec9b5dcba0992b3b68cbf6057f (patch)
treedb43d5265c4437707abc2e831eb2dbb6ce9d8f7e /tools
parent89b3ac63013e64621369f619fe732b629879c671 (diff)
tools/testing/selftests/ptrace/peeksiginfo.c: add PAGE_SIZE definition
On IBM powerpc where multiple page size value are supported, current ppc64 and ppc64el distro don't define the PAGE_SIZE variable in /usr/include as this is a dynamic value retrieved by the getpagesize() or sysconf() defined in unistd.h. The PAGE_SIZE variable sounds defined when only one value is supported by the kernel. As such, when the PAGE_SIZE definition doesn't exist system should retrieve the dynamic value. Signed-off-by: Thierry Fauck <thierry@linux.vnet.ibm.com> Cc: Andrey Vagin <avagin@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ptrace/peeksiginfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/ptrace/peeksiginfo.c b/tools/testing/selftests/ptrace/peeksiginfo.c
index d46558b1f58..c34cd8ac8aa 100644
--- a/tools/testing/selftests/ptrace/peeksiginfo.c
+++ b/tools/testing/selftests/ptrace/peeksiginfo.c
@@ -31,6 +31,10 @@ static int sys_ptrace(int request, pid_t pid, void *addr, void *data)
#define TEST_SICODE_PRIV -1
#define TEST_SICODE_SHARE -2
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(_SC_PAGESIZE)
+#endif
+
#define err(fmt, ...) \
fprintf(stderr, \
"Error (%s:%d): " fmt, \