[lkml]   [2019]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 47/66] perf tools: No need to include internal/lib.h from util/util.h
From: Arnaldo Carvalho de Melo <>

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 <>
Cc: Jiri Olsa <>
Cc: Namhyung Kim <>
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/tests/sdt.c | 1 +
tools/perf/util/util.h | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/sdt.c b/tools/perf/tests/sdt.c
index cf1bd57d3023..60f0e9ee04fb 100644
--- a/tools/perf/tests/sdt.c
+++ b/tools/perf/tests/sdt.c
@@ -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>
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index d6ae394e67c4..b78b73e5bb32 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -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;
 \ /
  Last update: 2019-09-26 02:36    [W:0.206 / U:5.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site