perf tools: Remove include dirent.h from util.h

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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 767fe71b
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "asm/bug.h" #include "asm/bug.h"
#include "util/mem-events.h" #include "util/mem-events.h"
#include "util/dump-insn.h" #include "util/dump-insn.h"
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
......
#include <dirent.h>
#include <stdlib.h> #include <stdlib.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "tests.h" #include "tests.h"
#include "debug.h" #include "debug.h"
#include "util.h" #include "util.h"
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/hw_breakpoint.h> #include <linux/hw_breakpoint.h>
......
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* Copyright (C) 2009, 2010 Arnaldo Carvalho de Melo <acme@redhat.com> * Copyright (C) 2009, 2010 Arnaldo Carvalho de Melo <acme@redhat.com>
*/ */
#include "util.h" #include "util.h"
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include "build-id.h" #include "build-id.h"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "../perf.h" #include "../perf.h"
#include "cpumap.h" #include "cpumap.h"
#include <assert.h> #include <assert.h>
#include <dirent.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <linux/bitmap.h> #include <linux/bitmap.h>
......
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <linux/kernel.h> #include <linux/kernel.h>
......
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include "callchain.h" #include "callchain.h"
......
#include <linux/hw_breakpoint.h> #include <linux/hw_breakpoint.h>
#include <linux/err.h> #include <linux/err.h>
#include <dirent.h>
#include <errno.h> #include <errno.h>
#include "term.h" #include "term.h"
#include "../perf.h" #include "../perf.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#ifdef HAVE_BACKTRACE_SUPPORT #ifdef HAVE_BACKTRACE_SUPPORT
#include <execinfo.h> #include <execinfo.h>
#endif #endif
#include <dirent.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <limits.h> #include <limits.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h>
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
#include <signal.h> #include <signal.h>
...@@ -82,6 +81,7 @@ static inline void *zalloc(size_t size) ...@@ -82,6 +81,7 @@ static inline void *zalloc(size_t size)
#define zfree(ptr) ({ free(*ptr); *ptr = NULL; }) #define zfree(ptr) ({ free(*ptr); *ptr = NULL; })
struct dirent;
struct strlist; struct strlist;
int mkdir_p(char *path, mode_t mode); int mkdir_p(char *path, mode_t mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment