From: Alexey Dobriyan Date: Tue, 17 Aug 2021 11:58:33 +0000 (+0300) Subject: perf tools: Fixup get_current_dir_name() compilation X-Git-Tag: io_uring-5.15-2021-09-11~29^2~47 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=128dbd78bd673f9edbc4413072b23efb6657feb0;p=linux-block.git 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) Acked-by: Namhyung Kim Link: http://lore.kernel.org/lkml/YRukaQbrgDWhiwGr@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo --- 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 +#include #include -#include /* Android's 'bionic' library, for one, doesn't have this */