Commit 391e42060098a743a87380ed02bf4c8126742b04

Authored by Arnaldo Carvalho de Melo
1 parent 56e2e05644

perf tools: Include sys/param.h where needed

As it is going away from util.h, where it is not needed.

This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later
two probably should go away in favor of its kernel sources replacements.

Link: http://lkml.kernel.org/n/tip-z1666f3fl3fqobxvjr5o2r39@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Showing 9 changed files with 8 additions and 1 deletions Side-by-side Diff

tools/perf/builtin-c2c.c
... ... @@ -15,6 +15,7 @@
15 15 #include <linux/kernel.h>
16 16 #include <linux/stringify.h>
17 17 #include <asm/bug.h>
  18 +#include <sys/param.h>
18 19 #include "util.h"
19 20 #include "debug.h"
20 21 #include "builtin.h"
tools/perf/builtin-script.c
... ... @@ -36,6 +36,7 @@
36 36 #include <errno.h>
37 37 #include <inttypes.h>
38 38 #include <signal.h>
  39 +#include <sys/param.h>
39 40  
40 41 #include "sane_ctype.h"
41 42  
tools/perf/tests/attr.c
... ... @@ -24,6 +24,7 @@
24 24 #include <stdio.h>
25 25 #include <linux/types.h>
26 26 #include <linux/kernel.h>
  27 +#include <sys/param.h>
27 28 #include "../perf.h"
28 29 #include "util.h"
29 30 #include <subcmd/exec-cmd.h>
tools/perf/tests/code-reading.c
... ... @@ -6,6 +6,7 @@
6 6 #include <unistd.h>
7 7 #include <stdio.h>
8 8 #include <string.h>
  9 +#include <sys/param.h>
9 10  
10 11 #include "parse-events.h"
11 12 #include "evlist.h"
tools/perf/util/config.c
... ... @@ -9,6 +9,7 @@
9 9 *
10 10 */
11 11 #include <errno.h>
  12 +#include <sys/param.h>
12 13 #include "util.h"
13 14 #include "cache.h"
14 15 #include <subcmd/exec-cmd.h>
tools/perf/util/header.c
... ... @@ -2,6 +2,7 @@
2 2 #include <inttypes.h>
3 3 #include "util.h"
4 4 #include "string2.h"
  5 +#include <sys/param.h>
5 6 #include <sys/types.h>
6 7 #include <byteswap.h>
7 8 #include <unistd.h>
tools/perf/util/hist.c
... ... @@ -12,6 +12,7 @@
12 12 #include "ui/progress.h"
13 13 #include <errno.h>
14 14 #include <math.h>
  15 +#include <sys/param.h>
15 16  
16 17 static bool hists__filter_entry_by_dso(struct hists *hists,
17 18 struct hist_entry *he);
tools/perf/util/parse-events.c
... ... @@ -2,6 +2,7 @@
2 2 #include <linux/err.h>
3 3 #include <dirent.h>
4 4 #include <errno.h>
  5 +#include <sys/param.h>
5 6 #include "term.h"
6 7 #include "../perf.h"
7 8 #include "evlist.h"
tools/perf/util/util.h
... ... @@ -17,7 +17,6 @@
17 17 #include <stdlib.h>
18 18 #include <stdarg.h>
19 19 #include <string.h>
20   -#include <sys/param.h>
21 20 #include <sys/types.h>
22 21 #include <assert.h>
23 22 #include <sys/wait.h>