lkml.org 
[lkml]   [2019]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tools lib: Disable redundant-delcs error for strlcpy
On Mon, Dec 09, 2019 at 12:46:07AM +0300, Vitaly Chikunov wrote:
> Disable `redundant-decls' error for strlcpy declaration and solve build
> error allowing users to compile vanilla kernels.
>
> When glibc have strlcpy (such as in ALT linux since 2004) objtool and
> perf build fails with something like:
>
> In file included from exec-cmd.c:3:
> tools/include/linux/string.h:20:15: error: redundant redeclaration of ‘strlcpy’ [-Werror=redundant-decls]
> 20 | extern size_t strlcpy(char *dest, const char *src, size_t size);
> | ^~~~~~~
>
> It's very hard to produce a perfect fix for that since it is a header
> file indirectly pulled from many sources from different Makefile builds.
>
> Fixes: ce99091 ("perf tools: Move strlcpy() from perf to tools/lib/string.c")
> Fixes: 0215d59 ("tools lib: Reinstate strlcpy() header guard with __UCLIBC__")
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
> Cc: Dmitry V. Levin <ldv@altlinux.org>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
> Cc: stable@vger.kernel.org

Apparently, this patch also addresses
https://bugzilla.kernel.org/show_bug.cgi?id=118481


--
ldv
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-12-08 23:20    [W:0.044 / U:6.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site