Re: [PATCH] perf/build: Include linux/string.h by jitdump.c for strlcpy()
From: Namhyung Kim
Date: Sun Nov 29 2026 - 18:42:24 EST
On Thu, 26 Nov 2026 06:08:35 +0000, Dmitry Safonov wrote:
> jit_open() now calls strlcpy(), but jitdump.c only includes the libc
> <string.h>. With glibc older than 2.38, that header does not declare
> strlcpy(), causing the build to fail:
>
> util/jitdump.c:246:17: error: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
> 246 | strlcpy(jd->dir, dname, sizeof(jd->dir));
> | ^~~~~~~
> | strncpy
>
> [...]
Applied to perf-tools-next, thanks!
Best regards
Namhyung