From 0e2e851f50b362a1c9065151970f004dbccf7a53 Mon Sep 17 00:00:00 2001 From: Felipe Moura Date: Tue, 15 Sep 2026 20:30:30 -0300 Subject: [PATCH] fsutils/libtinycbor: fix build on picolibc/newlib CONFIG_FSUTILS_TINYCBOR_LIB fails to build on toolchains with their own (picolibc, newlib): cbortojson.c does "#include " meaning TinyCBOR's own (where cbor_malloc/cbor_realloc/cbor_free are declared), but only the parent directory was on the include path, so the toolchain's own wins instead, leaving those symbols implicitly declared. Fix: also put the unpacked tinycbor/ subdirectory (Make.defs' own TINYCBOR_UNPACKNAME) on the include path. Signed-off-by: Felipe Moura Assisted-by: Claude:claude-sonnet-5 --- fsutils/libtinycbor/Make.defs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fsutils/libtinycbor/Make.defs b/fsutils/libtinycbor/Make.defs index 4465760a3..bdb96285c 100644 --- a/fsutils/libtinycbor/Make.defs +++ b/fsutils/libtinycbor/Make.defs @@ -23,4 +23,9 @@ ifneq ($(CONFIG_FSUTILS_TINYCBOR_LIB),) CONFIGURED_APPS += $(APPDIR)/fsutils/libtinycbor CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/fsutils/libtinycbor + +# cbortojson.c's "#include " means TinyCBOR's own, not the +# toolchain's; without this on the path picolibc/newlib's wins instead. + +CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/fsutils/libtinycbor/tinycbor endif