From b808a2487631c66e475ec397c32ff91d7dceba67 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 17 Jul 2017 15:59:35 -0400 Subject: [PATCH] there is no ucontext on ppc64 in rawhide, only ucontext_t --- gperftools-2.6.1-ppc64-ucontext-fix.patch | 13 +++++++++++++ gperftools.spec | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 gperftools-2.6.1-ppc64-ucontext-fix.patch diff --git a/gperftools-2.6.1-ppc64-ucontext-fix.patch b/gperftools-2.6.1-ppc64-ucontext-fix.patch new file mode 100644 index 0000000..4c0d15b --- /dev/null +++ b/gperftools-2.6.1-ppc64-ucontext-fix.patch @@ -0,0 +1,13 @@ +diff -up gperftools-2.6.1/src/stacktrace_powerpc-linux-inl.h.ucontextfix gperftools-2.6.1/src/stacktrace_powerpc-linux-inl.h +--- gperftools-2.6.1/src/stacktrace_powerpc-linux-inl.h.ucontextfix 2017-07-17 15:57:42.066001611 -0400 ++++ gperftools-2.6.1/src/stacktrace_powerpc-linux-inl.h 2017-07-17 15:58:04.610427563 -0400 +@@ -53,7 +53,8 @@ + #elif defined(HAVE_UCONTEXT_H) + #include // for ucontext_t + #endif +-typedef ucontext ucontext_t; ++// no ucontext typedef on ppc64 ++// 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. diff --git a/gperftools.spec b/gperftools.spec index 2f502e4..be34574 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -10,6 +10,8 @@ Group: Development/Tools Summary: Very fast malloc and performance analysis tools URL: https://github.com/gperftools/gperftools Source0: https://github.com/gperftools/gperftools/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz +# There is no ucontext typedef on ppc64, at least not in rawhide. +Patch0: gperftools-2.6.1-ppc64-ucontext-fix.patch ExcludeArch: s390 %ifnarch s390x @@ -58,6 +60,7 @@ Pprof is a heap and CPU profiler tool, part of the gperftools suite. %prep %setup -q +%patch0 -p1 -b .ucontextfix # Fix end-of-line encoding sed -i 's/\r//' README_windows.txt