From: Thierry Fauck <thierry@
Date: Fri, 28 Feb 2014 16:17:50 +0100
Subject: [PATCH] selftests: PAGE_SIZE may not be defined
Some systems have a dynamic
PAGE_SIZE value and do not add a definition
for PAGE_SIZE. This value will have to be retrieved using
getpagesize()
or sysconf().
Signed-off-by: Thierry Fauck <thierry@
---
tools/
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/
index d46558b..f2ccbbd 100644
--- a/tools/
+++ b/tools/
@@ -35,7 +35,9 @@ static int sys_ptrace(int request, pid_t pid,
void *addr, void *data)
fprintf(stderr, \
"Error (%s:%d): " fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)
-
+#ifndef PAGE_SIZE
+#define PAGE_SIZE sysconf(
+#endif
static int check_error_
{
struct ptrace_
--
1.9.0
-- Thierry Fauck (thierry@linux.vnet.ibm.com)