lkml.org 
[lkml]   [2021]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] perf, android: fixup get_current_dir_name() compilation
Hello,

On Tue, Aug 17, 2021 at 4:59 AM Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> strdup() prototype doesn't live in stdlib.h .
>
> Add limits.h for PATH_MAX definition as well.
>
> Signed-off-by: Alexey Dobriyan (SK hynix) <adobriyan@gmail.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>
> tools/perf/util/get_current_dir_name.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- 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 */
>

\
 
 \ /
  Last update: 2021-08-19 18:29    [W:0.069 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site