perf tools: Fixup get_current_dir_name() compilation
PATCH RESEND 1/1 perf tools: Fixup get_current_dir_name() compilation
From: Alexey Dobriyan <[email protected]>
commit 128dbd78bd673f9edbc4413072b23efb6657feb0 upstream
strdup() prototype doesn't live in stdlib.h .
Add limits.h for PATH_MAX definition as well.
This fixes the build on Android.
---
This patch is necessary to build perf with a musl-libc toolchain, not just Android's bionic.
Resending because missed stable the first time
tools/perf/util/get_current_dir_name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/get_current_dir_name.c +2 -1
@@ -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 */
Signature · 1 line
2.25.1
Greg Kroah-Hartman
maintainerQuoted 15 lines · Florian Fainelli
From: Alexey Dobriyan <[email protected]>
commit
128dbd78bd673f9edbc4413072b23efb6657feb0upstream
strdup()prototype doesn't live instdlib.h.Add
limits.hforPATH_MAXdefinition as well.This fixes the build on Android.
Signed-off-by Alexey Dobriyan (SK hynix) <[email protected]>Acked-by Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>Signed-off-by Florian Fainelli <[email protected]>
Quoted 6 lines
---
This patch is necessary to build perf with a musl-libc toolchain, not just Android's bionic.
Resending because missed stable the first time
Both backports now queued up, thanks.
greg k-h