* [PATCH RESEND stable 5.4] perf tools: Fixup get_current_dir_name() compilation
@ 2022-10-05 20:40 Florian Fainelli
2022-10-07 6:47 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2022-10-05 20:40 UTC (permalink / raw)
To: stable
Cc: Alexey Dobriyan, Namhyung Kim, Arnaldo Carvalho de Melo,
Florian Fainelli, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, open list:PERFORMANCE EVENTS SUBSYSTEM,
Greg Kroah-Hartman, Sasha Levin
From: Alexey Dobriyan <adobriyan@gmail.com>
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.
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>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
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(-)
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 */
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND stable 5.4] perf tools: Fixup get_current_dir_name() compilation
2022-10-05 20:40 [PATCH RESEND stable 5.4] perf tools: Fixup get_current_dir_name() compilation Florian Fainelli
@ 2022-10-07 6:47 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2022-10-07 6:47 UTC (permalink / raw)
To: Florian Fainelli
Cc: stable, Alexey Dobriyan, Namhyung Kim, Arnaldo Carvalho de Melo,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa,
open list:PERFORMANCE EVENTS SUBSYSTEM, Sasha Levin
On Wed, Oct 05, 2022 at 01:40:28PM -0700, Florian Fainelli wrote:
> From: Alexey Dobriyan <adobriyan@gmail.com>
>
> 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.
>
> 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>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-07 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 20:40 [PATCH RESEND stable 5.4] perf tools: Fixup get_current_dir_name() compilation Florian Fainelli
2022-10-07 6:47 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®