summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ptrace/peeksiginfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/ptrace/peeksiginfo.c')
-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 d46558b1f58d..c34cd8ac8aaa 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, \