From d0865dd6981d78220421dcc653b7af4b4022f4372f530520c5bc926cf9682aec Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 14 Aug 2017 08:03:09 +0000 Subject: [PATCH] Accepting request 515873 from home:Andreas_Schwab:Factory - ucontext.patch: fix use of ucontext_t OBS-URL: https://build.opensuse.org/request/show/515873 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gperftools?expand=0&rev=38 --- gperftools.changes | 5 +++++ gperftools.spec | 2 ++ ucontext.patch | 29 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 ucontext.patch diff --git a/gperftools.changes b/gperftools.changes index 886ab39..cda7f60 100644 --- a/gperftools.changes +++ b/gperftools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 10 10:17:23 UTC 2017 - schwab@suse.de + +- ucontext.patch: fix use of ucontext_t + ------------------------------------------------------------------- Fri Mar 31 15:23:59 UTC 2017 - fcrozat@suse.com diff --git a/gperftools.spec b/gperftools.spec index 9e53dc7..acd6059 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -26,6 +26,7 @@ Url: https://github.com/gperftools/gperftools Source0: https://github.com/gperftools/gperftools/releases/download/gperftools-%{version}/gperftools-%{version}.tar.gz Patch1: %{name}_fix_unassigned_malloc_in_unittest.patch Patch2: %{name}_gcc46.patch +Patch3: ucontext.patch BuildRequires: autoconf >= 2.59 BuildRequires: automake BuildRequires: gcc-c++ @@ -77,6 +78,7 @@ files for developing applications that use the gperftools package. %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build autoreconf -fi diff --git a/ucontext.patch b/ucontext.patch new file mode 100644 index 0000000..031b536 --- /dev/null +++ b/ucontext.patch @@ -0,0 +1,29 @@ +Index: gperftools-2.5/src/stacktrace_powerpc-linux-inl.h +=================================================================== +--- gperftools-2.5.orig/src/stacktrace_powerpc-linux-inl.h ++++ gperftools-2.5/src/stacktrace_powerpc-linux-inl.h +@@ -44,6 +44,7 @@ + + #include // for uintptr_t + #include // for NULL ++#include // for siginfo_t + #include + #include + +@@ -52,7 +53,6 @@ + #elif defined(HAVE_UCONTEXT_H) + #include // for ucontext_t + #endif +-typedef ucontext ucontext_t; + + // PowerPC64 Little Endian follows BE wrt. backchain, condition register, + // and LR save area, so no need to adjust the reading struct. +@@ -201,7 +201,7 @@ static int GET_STACK_TRACE_OR_FRAMES { + struct rt_signal_frame_32 { + char dummy[64 + 16]; + siginfo_t info; +- struct ucontext uc; ++ ucontext_t uc; + // We don't care about the rest, since IP value is at 'uc' field.A + } *sigframe = reinterpret_cast(current); + result[n] = (void*) sigframe->uc.uc_mcontext.uc_regs->gregs[PT_NIP];