summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFlorian Fainelli <florian.fainelli@broadcom.com>2026-10-26 10:48:10 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-10-27 17:40:37 -0300
commit022b0ac5d3e87f87cb7ba42d04d0bc3ddfdd6be4 (patch)
tree21adf03c450b99407995ec454f604354e7e49ff3 /tools
parente0e4470aa53c0022418290fb551c21da4bd50209 (diff)
perf parse-events: Include errno.h before kernel headers
Building perf against uClibc fails in config_term_common(): util/parse-events.c:954:30: error: 'ERANGE' undeclared The kernel headers included before errno.h pull in asm/errno.h. uClibc's bits/errno.h undefines EDOM, EILSEQ and ERANGE before including linux/errno.h, but the kernel header include guards prevent these macros from being defined again. Include errno.h before the kernel headers so ERANGE remains defined. Fixes: 6b9c0261b3fb298b ("perf record: Add ratio-to-prev term") Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Faisal Bukhari <faisalbukhari523@gmail.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Qinxin Xia <xiaqinxin@huawei.com> Cc: Thomas Falcon <thomas.falcon@intel.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 2f3317ce17f0..f3ba70d4f76b 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
+#include <errno.h>
#include <linux/hw_breakpoint.h>
#include <linux/err.h>
#include <linux/list_sort.h>
#include <linux/zalloc.h>
#include <dirent.h>
-#include <errno.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include "cpumap.h"