summaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2021-08-17 14:58:33 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-08-30 10:06:16 -0300
commit128dbd78bd673f9edbc4413072b23efb6657feb0 (patch)
tree13192e59b14a4164adb14f4b1cc90a6919c983f2 /tools/perf/util
parentc635813fef0b2327ffecbfbd642f0009e186b3a5 (diff)
perf tools: Fixup get_current_dir_name() compilation
strdup() prototype doesn't live in stdlib.h . Add limits.h for PATH_MAX definition as well. This fixes the build on Android. Signed-off-by: Alexey Dobriyan (SK hynix) <adobriyan@gmail.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: http://lore.kernel.org/lkml/YRukaQbrgDWhiwGr@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/get_current_dir_name.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/get_current_dir_name.c b/tools/perf/util/get_current_dir_name.c
index b205d929245f..e68935e9ac8c 100644
--- a/tools/perf/util/get_current_dir_name.c
+++ b/tools/perf/util/get_current_dir_name.c
@@ -3,8 +3,9 @@
//
#ifndef HAVE_GET_CURRENT_DIR_NAME
#include "get_current_dir_name.h"
+#include <limits.h>
+#include <string.h>
#include <unistd.h>
-#include <stdlib.h>
/* Android's 'bionic' library, for one, doesn't have this */