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.
This commit is contained in:
Evgenii Shatokhin 2017-07-17 11:17:06 +03:00
parent c2d7aa28fb
commit 67e5bb735a
2 changed files with 22 additions and 0 deletions

View file

@ -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

View file

@ -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 <errno.h> /* for EINVAL */
+
#ifndef REMOTE_UNWIND_LIBUNWIND
-#include <errno.h>
#include <libunwind.h>
#include "perf_regs.h"
#include "../../util/unwind.h"