mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-03 20:27:58 +00:00
fsutils/libtinycbor: fix build on picolibc/newlib
CONFIG_FSUTILS_TINYCBOR_LIB fails to build on toolchains with their own <memory.h> (picolibc, newlib): cbortojson.c does "#include <memory.h>" 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 <memory.h> 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 <moura.fmo@gmail.com> Assisted-by: Claude:claude-sonnet-5
This commit is contained in:
parent
b6bb99c951
commit
0e2e851f50
1 changed files with 5 additions and 0 deletions
|
|
@ -23,4 +23,9 @@
|
|||
ifneq ($(CONFIG_FSUTILS_TINYCBOR_LIB),)
|
||||
CONFIGURED_APPS += $(APPDIR)/fsutils/libtinycbor
|
||||
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)/fsutils/libtinycbor
|
||||
|
||||
# cbortojson.c's "#include <memory.h>" 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue