[PATCH] exception: Add missing string.h
Tom Rini
trini at konsulko.com
Fri Jul 25 16:31:07 CEST 2025
On Fri, Jul 25, 2025 at 03:29:27PM +0200, Michal Simek wrote:
>
>
> On 7/25/25 14:46, Heinrich Schuchardt wrote:
> > On 25.07.25 14:41, Michal Simek wrote:
> > > The commit 1e50f7457fca ("include/command.h: Drop <env.h>") removed env.h
> > > which also included string.h which generate compilation error.
> > > But because none is enabling CMD_EXCEPTION it by default it hasn't been
> > > spot.
> > >
> > > Signed-off-by: Michal Simek <michal.simek at amd.com>
> > > ---
> > >
> > > CC drivers/mtd/mtd-uclass.o
> > > In file included from cmd/riscv/exception.c:91:
> > > include/exception.h: In function 'exception_complete':
> > > include/exception.h:41:23: error: implicit declaration of function
> > > 'strlen' [- Wimplicit-function-declaration]
> > > 41 | len = strlen(argv[1]);
> > > | ^~~~~~
> > > include/exception.h:1:1: note: 'strlen' is defined in header
> > > '<string.h>'; this is probably fixable by adding '#include
> > > <string.h>'
> > > +++ |+#include <string.h>
> > > 1 | /* SPDX-License-Identifier: GPL-2.0+ */
> > > include/exception.h:49:22: error: implicit declaration of function
> > > 'strncmp' [-Wimplicit-function-declaration]
> > > 49 | if (!strncmp(argv[1], cmdtp->name, len))
> > > | ^~~~~~~
> > > include/exception.h:49:22: note: 'strncmp' is defined in header
> > > '<string.h>'; this is probably fixable by adding '#include
> > > <string.h>'
> > > make[2]: *** [scripts/Makefile.build:297: cmd/riscv/exception.o] Error 1
> > > make[2]: *** Waiting for unfinished jobs....
> > > CC drivers/serial/serial-uclass.o
> > >
> > > ---
> > > include/exception.h | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/include/exception.h b/include/exception.h
> > > index a7f21e73d753..0d4dff49954b 100644
> > > --- a/include/exception.h
> > > +++ b/include/exception.h
> > > @@ -6,6 +6,7 @@
> > > */
> > > #include <command.h>
> > > +#include <string.h>
> > > static int do_exception(struct cmd_tbl *cmdtp, int flag, int argc,
> > > char *const argv[])
> >
> > This patch just looks like
> > https://patchwork.ozlabs.org/project/uboot/patch/20250702205818.44188-1-
> > heinrich.schuchardt at canonical.com/
> > and
> > https://patchwork.ozlabs.org/project/uboot/patch/20250703051951.43372-2-
> > heinrich.schuchardt at canonical.com/
> > which were positively reviewed.
> >
> > Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>
> yes it is the same.
>
> Tom: Please drop this one and take origin one
OK. If it's not ugent, it will come with v2 of the arm64 stack
backtraces that Casey posted today, once that's ready to merge.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250725/9db23c2d/attachment.sig>
More information about the U-Boot
mailing list