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

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>

authored by

Alexey Dobriyan and committed by
Arnaldo Carvalho de Melo
128dbd78 c635813f

+2 -1
+2 -1
tools/perf/util/get_current_dir_name.c
··· 3 3 // 4 4 #ifndef HAVE_GET_CURRENT_DIR_NAME 5 5 #include "get_current_dir_name.h" 6 + #include <limits.h> 7 + #include <string.h> 6 8 #include <unistd.h> 7 - #include <stdlib.h> 8 9 9 10 /* Android's 'bionic' library, for one, doesn't have this */ 10 11