From 67e5bb735a2dde4ae1b20c9544e7bf9d72191ebb Mon Sep 17 00:00:00 2001 From: Evgenii Shatokhin Date: Mon, 17 Jul 2017 11:17:06 +0300 Subject: [PATCH] perf/unwind: include errno.h unconditionally EINVAL is used in other branches as well. Without errno.h, it ends up undefined and the build fails. This happens with 32-bit ROSA kernels, for example. --- kernel.spec | 3 +++ perf-unwind-include-errno_h.patch | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 perf-unwind-include-errno_h.patch diff --git a/kernel.spec b/kernel.spec index c76de08..b90f08d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -200,6 +200,9 @@ Patch108: ata-prefer-ata-drivers-over-ide-drivers-when-both-are-built.patch # AUFS from http://aufs.sourceforge.net/ Patch109: fs-aufs4.patch +# Fix building of perf on 32-bit systems +Patch110: perf-unwind-include-errno_h.patch + # https://bugs.freedesktop.org/show_bug.cgi?id=97822 # http://bugs.rosalinux.ru/show_bug.cgi?id=7533 Patch200: i915_hack_bug_97822.patch diff --git a/perf-unwind-include-errno_h.patch b/perf-unwind-include-errno_h.patch new file mode 100644 index 0000000..2049fc3 --- /dev/null +++ b/perf-unwind-include-errno_h.patch @@ -0,0 +1,19 @@ +perf/unwind: include errno.h unconditionally + +EINVAL is used in other branches as well. Without errno.h, it ends up +undefined and the build fails. This happens with 32-bit ROSA kernels, for +example. + +diff --git a/tools/perf/arch/x86/util/unwind-libunwind.c b/tools/perf/arch/x86/util/unwind-libunwind.c +index 4f16661cbdbb..597588c8c7e6 100644 +--- a/tools/perf/arch/x86/util/unwind-libunwind.c ++++ b/tools/perf/arch/x86/util/unwind-libunwind.c +@@ -1,6 +1,7 @@ + ++#include /* for EINVAL */ ++ + #ifndef REMOTE_UNWIND_LIBUNWIND +-#include + #include + #include "perf_regs.h" + #include "../../util/unwind.h"