diff --git a/components/cbor/CMakeLists.txt b/components/cbor/CMakeLists.txt index 5aaaaf80f..cb31da5e5 100644 --- a/components/cbor/CMakeLists.txt +++ b/components/cbor/CMakeLists.txt @@ -12,7 +12,7 @@ idf_component_register(SRCS "tinycbor/src/cborencoder_close_container_checked.c" PRIV_INCLUDE_DIRS "tinycbor/src") # for open_memstream.c -target_compile_definitions(${COMPONENT_LIB} PRIVATE "__GLIBC__") +set_source_files_properties(tinycbor/src/open_memstream.c PROPERTIES COMPILE_DEFINITIONS "__linux__") # cbortojson.c:378:17: assignment discards 'const' qualifier from pointer target type target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-discarded-qualifiers") diff --git a/components/cbor/component.mk b/components/cbor/component.mk index 9f9d37c36..7f4f1b963 100644 --- a/components/cbor/component.mk +++ b/components/cbor/component.mk @@ -3,6 +3,6 @@ COMPONENT_ADD_INCLUDEDIRS := port/include COMPONENT_SRCDIRS := tinycbor/src COMPONENT_PRIV_INCLUDEDIRS := tinycbor/src -tinycbor/src/open_memstream.o: CFLAGS += -D__GLIBC__ +tinycbor/src/open_memstream.o: CFLAGS += -D__linux__ tinycbor/src/cbortojson.o: CFLAGS += -Wno-discarded-qualifiers tinycbor/src/cborvalidation.o: CFLAGS += -Wno-maybe-uninitialized diff --git a/components/cbor/tinycbor b/components/cbor/tinycbor index d2dd95cb8..085ca4078 160000 --- a/components/cbor/tinycbor +++ b/components/cbor/tinycbor @@ -1 +1 @@ -Subproject commit d2dd95cb8841d88d5a801e3ef9c328fd6200e7bd +Subproject commit 085ca40781f7c39febe6d14fb7e5cba342e1804b