diff options
| -rw-r--r-- | meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch | 51 | ||||
| -rw-r--r-- | meta/recipes-extended/psmisc/psmisc_22.21.bb | 8 |
2 files changed, 56 insertions, 3 deletions
diff --git a/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch new file mode 100644 index 0000000000..b57a006bc6 --- /dev/null +++ b/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From 5dc872bb2fba6421cb8e1ee578f7bd4aaed55f61 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 24 Mar 2016 15:46:14 +0000 | ||
| 4 | Subject: [PATCH] Use UINTPTR_MAX instead of __WORDSIZE | ||
| 5 | |||
| 6 | Do not include sys/user.h since it conflicts with | ||
| 7 | pt_regs struct from kernel APIs in asm/ptrace.h | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | src/peekfd.c | 13 ++++++++----- | ||
| 14 | 1 file changed, 8 insertions(+), 5 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/src/peekfd.c b/src/peekfd.c | ||
| 17 | index cba2130..0d39878 100644 | ||
| 18 | --- a/src/peekfd.c | ||
| 19 | +++ b/src/peekfd.c | ||
| 20 | @@ -30,8 +30,11 @@ | ||
| 21 | #include <asm/ptrace.h> | ||
| 22 | #include <byteswap.h> | ||
| 23 | #include <endian.h> | ||
| 24 | +#ifdef __GLIBC__ | ||
| 25 | #include <sys/user.h> | ||
| 26 | +#endif | ||
| 27 | #include <stdlib.h> | ||
| 28 | +#include <stdint.h> | ||
| 29 | #include <getopt.h> | ||
| 30 | #include <ctype.h> | ||
| 31 | |||
| 32 | @@ -228,11 +231,11 @@ int main(int argc, char **argv) | ||
| 33 | if (WIFSTOPPED(status)) { | ||
| 34 | #ifdef PPC | ||
| 35 | struct pt_regs regs; | ||
| 36 | - regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R0, 0); | ||
| 37 | - regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R3, 0); | ||
| 38 | - regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R4, 0); | ||
| 39 | - regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R5, 0); | ||
| 40 | - regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_ORIG_R3, 0); | ||
| 41 | + regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R0, 0); | ||
| 42 | + regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R3, 0); | ||
| 43 | + regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R4, 0); | ||
| 44 | + regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R5, 0); | ||
| 45 | + regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_ORIG_R3, 0); | ||
| 46 | #elif defined(ARM) | ||
| 47 | struct pt_regs regs; | ||
| 48 | ptrace(PTRACE_GETREGS, pid, 0, ®s); | ||
| 49 | -- | ||
| 50 | 1.9.1 | ||
| 51 | |||
diff --git a/meta/recipes-extended/psmisc/psmisc_22.21.bb b/meta/recipes-extended/psmisc/psmisc_22.21.bb index 66aba9ec57..1c6473ebf4 100644 --- a/meta/recipes-extended/psmisc/psmisc_22.21.bb +++ b/meta/recipes-extended/psmisc/psmisc_22.21.bb | |||
| @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | |||
| 5 | SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf" | 5 | SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf" |
| 6 | SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a" | 6 | SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a" |
| 7 | 7 | ||
| 8 | SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \ | 8 | SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \ |
| 9 | file://0002-Include-limits.h-for-PATH_MAX.patch \ | 9 | file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \ |
| 10 | " | 10 | file://0002-Include-limits.h-for-PATH_MAX.patch \ |
| 11 | file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \ | ||
| 12 | " | ||
