Skip to contentSkip to conversation

tools/testing/selftests/ptrace/peeksiginfo.c bug

PATCH Thierry FAUCK 1 participant 1 message Apr 7, 2014 Kselftest

lore
Share & tools
lore
#0 lore raw

Hello,

Here is a fix to allow compilation of tools/testing/selftests/ptrace/peeksiginfo.c on ppc64/ppc64el. Canonical is waiting for the patch to be upstream. Thanks

Thierry

Quoted 1 line

From 48a9a9834377a74b603be12dcc76cda24105e33c Mon Sep 17 00:00:00 2001

From: Thierry Fauck <[email protected]>
Date: Fri, 28 Feb 2014 16:17:50 +0100
Subject: [PATCH] power: 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().

---
 tools/testing/selftests/ptrace/peeksiginfo.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/tools/testing/selftests/ptrace/peeksiginfo.c
index d46558b..f2ccbbd 100644

tools/testing/selftests/ptrace/peeksiginfo.c +0 -0
@@ -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(_SC_PAGESIZE)
+#endif
static int check_error_paths(pid_t child)
{
struct ptrace_peeksiginfo_args arg;
--
1.9.0