mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
ltrace: Fix build on ppc64le/musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
7d4174ab0a
commit
abbee9b35f
39
meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch
Normal file
39
meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch
Normal file
@ -0,0 +1,39 @@
|
||||
--- a/sysdeps/linux-gnu/ppc/ptrace.h
|
||||
+++ b/sysdeps/linux-gnu/ppc/ptrace.h
|
||||
@@ -18,4 +18,5 @@
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
+#include <asm/ptrace.h>
|
||||
#include <sys/ptrace.h>
|
||||
--- a/sysdeps/linux-gnu/ppc/regs.c
|
||||
+++ b/sysdeps/linux-gnu/ppc/regs.c
|
||||
@@ -23,11 +23,14 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <errno.h>
|
||||
+#ifdef HAVE_ERROR_H
|
||||
#include <error.h>
|
||||
+#endif
|
||||
|
||||
#include "proc.h"
|
||||
#include "common.h"
|
||||
@@ -49,8 +52,11 @@ get_instruction_pointer(struct process *
|
||||
void
|
||||
set_instruction_pointer(struct process *proc, void *addr)
|
||||
{
|
||||
- if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0)
|
||||
- error(0, errno, "set_instruction_pointer");
|
||||
+ if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){
|
||||
+ report_global_error("%s: set_instruction_pointer",
|
||||
+ strerror(errno));
|
||||
+ exit(1);
|
||||
+ }
|
||||
}
|
||||
|
||||
void *
|
||||
@ -30,6 +30,8 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http
|
||||
file://0001-Bug-fix-for-data-type-length-judgment.patch \
|
||||
file://0001-ensure-the-struct-pointers-are-null-initilized.patch \
|
||||
"
|
||||
SRC_URI_append_libc-musl = " file://add_ppc64le.patch"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user