perf tools: Remove include dirent.h from util.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Apr 2017 15:26:44 +0000 (12:26 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Apr 2017 16:01:55 +0000 (13:01 -0300)
The files using the dirent.h routines should instead include it,
reducing the includes hell that lead to longer build times.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-script.c
tools/perf/tests/dso-data.c
tools/perf/tests/parse-events.c
tools/perf/ui/browsers/hists.c
tools/perf/util/build-id.c
tools/perf/util/cpumap.c
tools/perf/util/event.c
tools/perf/util/machine.c
tools/perf/util/parse-events.c
tools/perf/util/util.c
tools/perf/util/util.h

index 853651a0f7202f4a6505e1312da3a53d078bdac8..fe1dcd4f2c6d41b18e94a8d13b6efd9c1c9d72c4 100644 (file)
@@ -32,6 +32,7 @@
 #include "asm/bug.h"
 #include "util/mem-events.h"
 #include "util/dump-insn.h"
+#include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
 
index 46ea2e061b86f00849ea385086b8381972348e63..8f08df5861cb36c7b3415dd706e63cff8ad1aa46 100644 (file)
@@ -1,3 +1,4 @@
+#include <dirent.h>
 #include <stdlib.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
index f5b77f5c3192e267c69a786ed92eb10f25ec1a62..981d2bf9914f12bd2dc754c6c0cb5f0f6736dfc6 100644 (file)
@@ -5,6 +5,7 @@
 #include "tests.h"
 #include "debug.h"
 #include "util.h"
+#include <dirent.h>
 #include <errno.h>
 #include <linux/kernel.h>
 #include <linux/hw_breakpoint.h>
index a271b48ad0d3d20b9e2de397b31fd43047948cd7..f0b5b2b0e521771e599486b5b0803416a9f5d16c 100644 (file)
@@ -1,3 +1,4 @@
+#include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <stdio.h>
index 9815a3b6667ad0e5276bc38fe3fb4b4df13cff77..923ea290bb6e3fa9bc455fa3584ec084d1099202 100644 (file)
@@ -7,6 +7,7 @@
  * Copyright (C) 2009, 2010 Arnaldo Carvalho de Melo <acme@redhat.com>
  */
 #include "util.h"
+#include <dirent.h>
 #include <errno.h>
 #include <stdio.h>
 #include "build-id.h"
index 9d9ecb2430cccd14e09d9366f499f413e821f058..37b3bb79ee08db66122c30f6ae5af2473f005d7a 100644 (file)
@@ -3,6 +3,7 @@
 #include "../perf.h"
 #include "cpumap.h"
 #include <assert.h>
+#include <dirent.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <linux/bitmap.h>
index 1fc1217a0c2c26b7de39f038d7df921d8dadf2bd..cf457ef534dad6e62ea3f3b2b441ad249d178e46 100644 (file)
@@ -1,3 +1,4 @@
+#include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
 #include <linux/kernel.h>
index cdbfe3e32e5a85cfce0c84b5abd8c30a776bfb73..46411742d03c33f6d22e914609b51b92e2f65871 100644 (file)
@@ -1,3 +1,4 @@
+#include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
 #include "callchain.h"
index f3dd1aa59a25c66d1d5bfdf263d0b52b13995594..7d84338b19ee1ecbe10484487d43f111aef75164 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/hw_breakpoint.h>
 #include <linux/err.h>
+#include <dirent.h>
 #include <errno.h>
 #include "term.h"
 #include "../perf.h"
index 64877c6d09b2c86fb72bd0d144b67ad2742a2c7f..b9716bc6e8fd64f1715b684aab0297f681fff48f 100644 (file)
@@ -7,6 +7,7 @@
 #ifdef HAVE_BACKTRACE_SUPPORT
 #include <execinfo.h>
 #endif
+#include <dirent.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
index d4910e490f20f1b0743e039ad142932de32053b1..c0574e2763b793a0788bd2fb5345ce3d2c590431 100644 (file)
@@ -20,7 +20,6 @@
 #include <limits.h>
 #include <sys/param.h>
 #include <sys/types.h>
-#include <dirent.h>
 #include <sys/time.h>
 #include <time.h>
 #include <signal.h>
@@ -82,6 +81,7 @@ static inline void *zalloc(size_t size)
 
 #define zfree(ptr) ({ free(*ptr); *ptr = NULL; })
 
+struct dirent;
 struct strlist;
 
 int mkdir_p(char *path, mode_t mode);