Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: No need to include internal/lib.h from util/util.h

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>

+1 -1
+1
tools/perf/tests/sdt.c
··· 3 3 #include <limits.h> 4 4 #include <stdio.h> 5 5 #include <stdlib.h> 6 + #include <unistd.h> 6 7 #include <sys/epoll.h> 7 8 #include <util/symbol.h> 8 9 #include <linux/filter.h>
-1
tools/perf/util/util.h
··· 11 11 #include <stddef.h> 12 12 #include <linux/compiler.h> 13 13 #include <sys/types.h> 14 - #include <internal/lib.h> 15 14 16 15 /* General helper functions */ 17 16 void usage(const char *err) __noreturn;