perf tools: No need to include internal/lib.h from util/util.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 Sep 2019 19:22:22 +0000 (16:22 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 25 Sep 2019 12:51:48 +0000 (09:51 -0300)
That was done just to have users of writen() and readn(), that before
had their prototypes in util/util.h to get it without having to add an
include for internal/lib.h, but the right way is to add it and by now
all places already do it.

Fix a fallout were readlink() was used but unistd.h was being obtained
by luck thru util.h -> internal/lib.h, now to check why unistd.h is
being included there...

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-lcnytgrtafey3kwlfog2rzzj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/sdt.c
tools/perf/util/util.h

index cf1bd57d302308525010b6c34a019a53d3206589..60f0e9ee04fb0951b1e0cf09f80897bf1b17fc08 100644 (file)
@@ -3,6 +3,7 @@
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <sys/epoll.h>
 #include <util/symbol.h>
 #include <linux/filter.h>
index d6ae394e67c4764cbbc79b673530efcfa2f3f4b5..b78b73e5bb324a50feb9d156ee49902d2eca1b8b 100644 (file)
@@ -11,7 +11,6 @@
 #include <stddef.h>
 #include <linux/compiler.h>
 #include <sys/types.h>
-#include <internal/lib.h>
 
 /* General helper functions */
 void usage(const char *err) __noreturn;