Skip to content

Commit

Permalink
perf tools: Include sys/param.h where needed
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
acmel committed Apr 24, 2017
1 parent 56e2e05 commit 391e420
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/perf/builtin-c2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/stringify.h>
#include <asm/bug.h>
#include <sys/param.h>
#include "util.h"
#include "debug.h"
#include "builtin.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <errno.h>
#include <inttypes.h>
#include <signal.h>
#include <sys/param.h>

#include "sane_ctype.h"

Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <stdio.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <sys/param.h>
#include "../perf.h"
#include "util.h"
#include <subcmd/exec-cmd.h>
Expand Down
1 change: 1 addition & 0 deletions tools/perf/tests/code-reading.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/param.h>

#include "parse-events.h"
#include "evlist.h"
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
*/
#include <errno.h>
#include <sys/param.h>
#include "util.h"
#include "cache.h"
#include <subcmd/exec-cmd.h>
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/header.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <inttypes.h>
#include "util.h"
#include "string2.h"
#include <sys/param.h>
#include <sys/types.h>
#include <byteswap.h>
#include <unistd.h>
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "ui/progress.h"
#include <errno.h>
#include <math.h>
#include <sys/param.h>

static bool hists__filter_entry_by_dso(struct hists *hists,
struct hist_entry *he);
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <linux/err.h>
#include <dirent.h>
#include <errno.h>
#include <sys/param.h>
#include "term.h"
#include "../perf.h"
#include "evlist.h"
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/param.h>
#include <sys/types.h>
#include <assert.h>
#include <sys/wait.h>
Expand Down

0 comments on commit 391e420

Please sign in to comment.