mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-01 19:36:36 +00:00
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
31 lines
1.3 KiB
Text
31 lines
1.3 KiB
Text
############################################################################
|
|
# apps/fsutils/libtinycbor/Make.defs
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership. The
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance with the
|
|
# License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
############################################################################
|
|
|
|
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
|