1From bca7617f325787550e2133fe082dbe4da7716fc6 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Sat, 6 Aug 2016 17:32:50 -0700 4Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems 5 6Upstream-Status: Pending 7 8Signed-off-by: Khem Raj <raj.khem@gmail.com> 9Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 10[Rebase on gdb 8.3] 11Signed-off-by: Romain Naour <romain.naour@gmail.com> 12--- 13 gdb/nat/ppc-linux.h | 6 ++++++ 14 gdbserver/linux-ppc-low.cc | 6 ++++++ 15 2 files changed, 12 insertions(+) 16 17diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h 18index 1094f6b0be3..d8588a646c2 100644 19--- a/gdb/nat/ppc-linux.h 20+++ b/gdb/nat/ppc-linux.h 21@@ -18,7 +18,13 @@ 22 #ifndef NAT_PPC_LINUX_H 23 #define NAT_PPC_LINUX_H 24 25+#if !defined(__GLIBC__) 26+# define pt_regs uapi_pt_regs 27+#endif 28 #include <asm/ptrace.h> 29+#if !defined(__GLIBC__) 30+# undef pt_regs 31+#endif 32 #include <asm/cputable.h> 33 34 /* This sometimes isn't defined. */ 35diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc 36index 08824887003..69afbae5359 100644 37--- a/gdbserver/linux-ppc-low.cc 38+++ b/gdbserver/linux-ppc-low.cc 39@@ -23,7 +23,13 @@ 40 #include "elf/common.h" 41 #include <sys/uio.h> 42 #include <elf.h> 43+#if !defined(__GLIBC__) 44+# define pt_regs uapi_pt_regs 45+#endif 46 #include <asm/ptrace.h> 47+#if !defined(__GLIBC__) 48+# undef pt_regs 49+#endif 50 51 #include "arch/ppc-linux-common.h" 52 #include "arch/ppc-linux-tdesc.h" 53-- 542.37.1 55 56